9 int *pdim =
DIM(obj), n = pdim[1];
20 int packed =
class[2] ==
'p';
24 c##TYPE *px = c##PTR(x); \
25 if (class[1] == 'g') { \
26 if (c##NAME(test2)(px, (size_t) n, '\0', '\0', -'N')) \
28 } else if (!packed) { \
29 ul = (ul == 'U') ? 'L' : 'U'; \
30 if (c##NAME(test2)(px, (size_t) n, ul, '\0', 'N')) \
33 if (c##NAME(test1)(px, (size_t) n, ul, '\0', -'N')) \
47 int *pdim =
DIM(obj), n = pdim[1];
53 if (
class[2] !=
'T') {
58 int *pp = INTEGER(p), *pi = INTEGER(i), j, k, kend;
62 for (j = 0, k = 0; j < n; ++j) {
64 if (k < kend && (kend - k > 1 || pi[k] != j))
74 int *pi = INTEGER(i), *pj = INTEGER(j);
75 R_xlen_t k, kend = XLENGTH(i);
78 for (k = 0; k < kend; ++k)
88 if (
TYPEOF(s_obj) != OBJSXP) {
97 SEXP ans = Rf_ScalarLogical(ans_ != 0);
#define SWITCH4(c, template)
const char * valid_dense[]
const char * Matrix_class(SEXP, const char **, int, const char *)
#define GET_SLOT(x, name)
const char * valid_sparse[]
SEXP matrix_as_dense(SEXP from, const char *zzz, char ul, char ct, char nu, int mg, int new)
SEXP R_sparse_is_diagonal(SEXP s_obj)
SEXP R_dense_is_diagonal(SEXP s_obj)
int dense_is_diagonal(SEXP obj, const char *class)
int sparse_is_diagonal(SEXP obj, const char *class)