Matrix r4655
Loading...
Searching...
No Matches
Functions
utils-R.h File Reference
#include <Rinternals.h>

Go to the source code of this file.

Functions

SEXP R_Matrix_version (void)
 
SEXP R_index_triangle (SEXP, SEXP, SEXP, SEXP)
 
SEXP R_index_diagonal (SEXP, SEXP, SEXP)
 
SEXP R_nnz (SEXP, SEXP, SEXP)
 
SEXP R_all0 (SEXP)
 
SEXP R_any0 (SEXP)
 
SEXP Mmatrix (SEXP)
 
SEXP compressed_non_0_ij (SEXP, SEXP)
 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)
 
SEXP m_encodeInd (SEXP, SEXP, SEXP, SEXP)
 Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.
 
SEXP m_encodeInd2 (SEXP, SEXP, SEXP, SEXP, SEXP)
 Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}.
 
SEXP Matrix_rle_i (SEXP, SEXP)
 
SEXP Matrix_rle_d (SEXP, SEXP)
 

Function Documentation

◆ compressed_non_0_ij()

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.

◆ m_encodeInd()

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}.

Parameters
ij2-column integer matrix
didim(.), i.e. length 2 integer vector
chk_bndslogical indicating 0 <= ij[,k] < di[k] need to be checked.
Returns
encoded index; integer if prod(dim) is small; double otherwise

Definition at line 529 of file utils-R.c.

References _, and do_ii_FILL.

◆ m_encodeInd2()

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}.

Parameters
iinteger vector
jinteger vector of same length as 'i'
orig_1logical: if TRUE, "1-origin" otherwise "0-origin"
didim(.), i.e. length 2 integer vector
chk_bndslogical indicating 0 <= ij[,k] < di[k] need to be checked.
Returns
encoded index; integer if prod(dim) is small; double otherwise

Definition at line 607 of file utils-R.c.

References _, and do_ii_FILL.

◆ Matrix_expand_pointers()

SEXP Matrix_expand_pointers ( SEXP  pP)

Definition at line 509 of file utils-R.c.

References expand_cmprPt().

◆ Matrix_rle_d()

SEXP Matrix_rle_d ( SEXP  ,
SEXP   
)

◆ Matrix_rle_i()

SEXP Matrix_rle_i ( SEXP  ,
SEXP   
)

◆ Mmatrix()

SEXP Mmatrix ( SEXP  args)

Definition at line 325 of file utils-R.c.

References _.

◆ R_all0()

SEXP R_all0 ( SEXP  x)

Definition at line 231 of file utils-R.c.

References _, FALSE_, and TRUE_.

◆ R_any0()

SEXP R_any0 ( SEXP  x)

Definition at line 277 of file utils-R.c.

References _, FALSE_, and TRUE_.

◆ R_index_diagonal()

SEXP R_index_diagonal ( SEXP  n,
SEXP  packed,
SEXP  upper 
)

Definition at line 107 of file utils-R.c.

References _, and DO_INDEX.

◆ R_index_triangle()

SEXP R_index_triangle ( SEXP  n,
SEXP  packed,
SEXP  upper,
SEXP  diag 
)

Definition at line 20 of file utils-R.c.

References _, and DO_INDEX.

◆ R_Matrix_version()

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.

◆ R_nnz()

SEXP R_nnz ( SEXP  x,
SEXP  countNA,
SEXP  nnzmax 
)