Displaying 3 results from an estimated 3 matches for "compact_intseq_no_na".
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 11
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...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 int compact_intseq_No_NA(SEXP x)
{
#ifdef COMPACT_INTSEQ_MUTABLE
/* If the vector has been expanded it may have been modified. */
if (COMPACT_SEQ_EXPANDED(x) != R_NilValue)
return FALSE;
#endif
return TRUE;
}
(FALSE is a macro for 0, TRUE is a macro for 1).
Think of the meaning of the return value to No_NA me...
2019 Sep 11
1
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...TEGER (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 int compact_intseq_No_NA(SEXP x)
> {
> #ifdef COMPACT_INTSEQ_MUTABLE
> /* If the vector has been expanded it may have been modified. */
> if (COMPACT_SEQ_EXPANDED(x) != R_NilValue)
> return FALSE;
> #endif
> return TRUE;
> }
>
> (FALSE is a macro for 0, TRUE is a macro for 1).
>...