search for: unknown_sortedness

Displaying 8 results from an estimated 8 matches for "unknown_sortedness".

2019 Sep 03
2
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi, I would like to figure out the meaning of the return value of these two functions. Here are the default definitions I find from R source code: static int altreal_Is_sorted_default(SEXP x) { return UNKNOWN_SORTEDNESS; } static int altreal_No_NA_default(SEXP x) { return 0; } I guess the macro *UNKNOWN_SORTEDNESS *in *Is_sorted* and 0 in *No_NA *simply means unknown sorted/NA status of the vector, so R will loop over the vector and find the answer. However, what should we return in these functions to indicate w...
2019 Sep 04
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi, I've found the answers to my questions: 1. For sort function, here are some macros defined in Rinternal.h: /* ALTREP sorting support */ enum {SORTED_DECR_NA_1ST = -2, SORTED_DECR = -1, UNKNOWN_SORTEDNESS = INT_MIN, /*INT_MIN is NA_INTEGER! */ SORTED_INCR = 1, SORTED_INCR_NA_1ST = 2, KNOWN_UNSORTED = 0}; The macro names are pretty self-explanatory. The current implementation only supports the ascending sort. 2. For anyNA, it goes to(Real SEXP) ===========coerce.c=========== if(R...
2019 Sep 11
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi Jiefei, The meanings of the return values for sortedness can be found in RInternals.h, and are as follows: /* ALTREP sorting support */ enum {SORTED_DECR_NA_1ST = -2, SORTED_DECR = -1, UNKNOWN_SORTEDNESS = INT_MIN, /*INT_MIN is NA_INTEGER! */ SORTED_INCR = 1, SORTED_INCR_NA_1ST = 2, KNOWN_UNSORTED = 0}; The default value there is NA_INTEGER (ie INT_MIN), indicating that there is no sortedness information. Currently, *_NO_NA effectively return a boolean, (even though the actual...
2019 Sep 11
1
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...abriel Becker <gabembecker at gmail.com> wrote: > Hi Jiefei, > > The meanings of the return values for sortedness can be found in > RInternals.h, and are as follows: > > /* ALTREP sorting support */ > enum {SORTED_DECR_NA_1ST = -2, > SORTED_DECR = -1, > UNKNOWN_SORTEDNESS = INT_MIN, /*INT_MIN is NA_INTEGER! */ > SORTED_INCR = 1, > SORTED_INCR_NA_1ST = 2, > KNOWN_UNSORTED = 0}; > > The default value there is NA_INTEGER (ie INT_MIN), indicating that there > is no sortedness information. > > Currently, *_NO_NA effectively retu...
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
...ng to check if something is an > ALTREP and if so, call a specific ALT*_BLAH method, the intention is that > there should be a universal API point you can call which will work for both > types. > > This is true, e.g., of INTEGER_IS_SORTED (which will always work and just > returns UNKNOWN_SORTEDNESS, ie INT_MIN, ie NA_INTEGER for non-ALTREPs)., > for REAL_GET_REGION, (which populates a double* with the requested values > for both standard and ALTREP REALSXPs), etc. > > Does the above make sense? > > If you feel a universal API point is missing, you can raise that here, > t...
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
thanks for clearing that up, so these methods are actually not meant to be exported on Windows and OSX? Some of the ALTREP methods that now use 'attribute_hidden' would be very useful to packages that aim to be ALTREP aware, should the currently (exported) API be considered final? thanks for your time & best, Mark On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at
2019 Jun 04
0
[External] undefined symbol errors when compiling package using ALTREP API
...time you find yourself wanting to check if something is an ALTREP and if so, call a specific ALT*_BLAH method, the intention is that there should be a universal API point you can call which will work for both types. This is true, e.g., of INTEGER_IS_SORTED (which will always work and just returns UNKNOWN_SORTEDNESS, ie INT_MIN, ie NA_INTEGER for non-ALTREPs)., for REAL_GET_REGION, (which populates a double* with the requested values for both standard and ALTREP REALSXPs), etc. Does the above make sense? If you feel a universal API point is missing, you can raise that here, though I can't promise that wi...
2019 Jun 05
0
[External] undefined symbol errors when compiling package using ALTREP API
...is an >> ALTREP and if so, call a specific ALT*_BLAH method, the intention is that >> there should be a universal API point you can call which will work for both >> types. >> >> This is true, e.g., of INTEGER_IS_SORTED (which will always work and just >> returns UNKNOWN_SORTEDNESS, ie INT_MIN, ie NA_INTEGER for non-ALTREPs)., >> for REAL_GET_REGION, (which populates a double* with the requested values >> for both standard and ALTREP REALSXPs), etc. >> >> Does the above make sense? >> >> If you feel a universal API point is missing, you can...