Matrix r4655
|
Go to the source code of this file.
Macros | |
#define | DO_INDEX |
#define | DO_INDEX |
#define | DO_NNZ(_CTYPE_, _PTR_, _ISNA_, _ISNZ_, _STRICTLY_ISNZ_) |
#define | TRUE_ ScalarLogical(1) |
#define | FALSE_ ScalarLogical(0) |
#define | do_ii_FILL(_i_, _j_) |
#define | _rle_d_ |
#define | _rle_i_ |
Functions | |
SEXP | R_Matrix_version (void) |
SEXP | R_index_triangle (SEXP n, SEXP packed, SEXP upper, SEXP diag) |
SEXP | R_index_diagonal (SEXP n, SEXP packed, SEXP upper) |
SEXP | R_nnz (SEXP x, SEXP countNA, SEXP nnzmax) |
SEXP | R_all0 (SEXP x) |
SEXP | R_any0 (SEXP x) |
SEXP | Mmatrix (SEXP args) |
static int * | expand_cmprPt (int ncol, const int mp[], int mj[]) |
Expand compressed pointers in the array mp into a full set of indices in the array mj. | |
SEXP | compressed_non_0_ij (SEXP x, SEXP colP) |
Return a 2 column matrix '' cbind(i, j) '' of 0-origin index vectors (i,j) which entirely correspond to the (i,j) slots of as(x, "TsparseMatrix") : | |
SEXP | Matrix_expand_pointers (SEXP pP) |
SEXP | m_encodeInd (SEXP ij, SEXP di, SEXP orig_1, SEXP chk_bnds) |
Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}. | |
SEXP | m_encodeInd2 (SEXP i, SEXP j, SEXP di, SEXP orig_1, SEXP chk_bnds) |
Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}. | |
#define do_ii_FILL | ( | _i_, | |
_j_ | |||
) |
#define DO_INDEX |
#define DO_INDEX |
#define DO_NNZ | ( | _CTYPE_, | |
_PTR_, | |||
_ISNA_, | |||
_ISNZ_, | |||
_STRICTLY_ISNZ_ | |||
) |
SEXP compressed_non_0_ij | ( | SEXP | x, |
SEXP | colP | ||
) |
Return a 2 column matrix '' cbind(i, j) '' of 0-origin index vectors (i,j) which entirely correspond to the (i,j) slots of as(x, "TsparseMatrix") :
Definition at line 483 of file utils-R.c.
References expand_cmprPt(), GET_SLOT, Matrix_DimSym, Matrix_iSym, Matrix_jSym, and Matrix_pSym.
|
static |
Expand compressed pointers in the array mp into a full set of indices in the array mj.
ncol | number of columns (or rows) |
mp | column pointer vector of length ncol + 1 |
mj | vector of length mp[ncol] to hold the result |
Definition at line 468 of file utils-R.c.
Referenced by compressed_non_0_ij(), and Matrix_expand_pointers().
SEXP m_encodeInd | ( | SEXP | ij, |
SEXP | di, | ||
SEXP | orig_1, | ||
SEXP | chk_bnds | ||
) |
Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.
ij | 2-column integer matrix |
di | dim(.), i.e. length 2 integer vector |
chk_bnds | logical indicating 0 <= ij[,k] < di[k] need to be checked. |
Definition at line 529 of file utils-R.c.
References _, and do_ii_FILL.
SEXP m_encodeInd2 | ( | SEXP | i, |
SEXP | j, | ||
SEXP | di, | ||
SEXP | orig_1, | ||
SEXP | chk_bnds | ||
) |
Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.
i | integer vector |
j | integer vector of same length as 'i' |
orig_1 | logical: if TRUE, "1-origin" otherwise "0-origin" |
di | dim(.), i.e. length 2 integer vector |
chk_bnds | logical indicating 0 <= ij[,k] < di[k] need to be checked. |
Definition at line 607 of file utils-R.c.
References _, and do_ii_FILL.
SEXP Matrix_expand_pointers | ( | SEXP | pP | ) |
Definition at line 509 of file utils-R.c.
References expand_cmprPt().
SEXP R_index_diagonal | ( | SEXP | n, |
SEXP | packed, | ||
SEXP | upper | ||
) |
SEXP R_index_triangle | ( | SEXP | n, |
SEXP | packed, | ||
SEXP | upper, | ||
SEXP | diag | ||
) |
SEXP R_Matrix_version | ( | void | ) |
Definition at line 4 of file utils-R.c.
References MATRIX_ABI_VERSION, MATRIX_PACKAGE_VERSION, and MATRIX_SUITESPARSE_VERSION.
SEXP R_nnz | ( | SEXP | x, |
SEXP | countNA, | ||
SEXP | nnzmax | ||
) |
Definition at line 159 of file utils-R.c.
References DO_NNZ, ERROR_INVALID_TYPE, ISNA_COMPLEX, ISNA_INTEGER, ISNA_LOGICAL, ISNA_REAL, ISNZ_COMPLEX, ISNZ_INTEGER, ISNZ_LOGICAL, ISNZ_REAL, STRICTLY_ISNZ_COMPLEX, STRICTLY_ISNZ_INTEGER, STRICTLY_ISNZ_LOGICAL, and STRICTLY_ISNZ_REAL.