Displaying 4 results from an estimated 4 matches for "known_unsorted".
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
2019 Sep 04
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...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(REAL_NO_NA(x))
return FALSE;
ITERATE_BY_REGION(x, xD, i, nbatch, double, REAL, {
for (int k = 0; k < nbatch;...
2019 Sep 11
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...nings 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
return value is int). This can be seen in the method we provide for compact
sequences in altclasses.c:
static i...
2019 Sep 11
1
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...n 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
> return value is int). This can be seen in the method we provide for compact
> sequ...