|
Matrix $Rev: 2718 $ at $LastChangedDate: 2011-10-06 11:45:17 +0200 (Thu, 06 Oct 2011) $
|
#include <stdint.h>#include <ctype.h>#include <R.h>#include <Rversion.h>#include <Rdefines.h>#include "Syms.h"#include "t_sparseVector.c"

Go to the source code of this file.
Defines | |
| #define | _(String) (String) |
| #define | _dspV_ |
| Accessing *sparseVectors : fast (and recycling) v[i] for v = ?sparseVector: | |
| #define | _ispV_ |
| #define | _lspV_ |
| #define | _nspV_ |
| #define | _zspV_ |
| #define | Alloca(n, t) (t *) alloca( (size_t) ( (n) * sizeof(t) ) ) |
| #define | AZERO(x, n) {int _I_, _SZ_ = (n); for(_I_ = 0; _I_ < _SZ_; _I_++) (x)[_I_] = 0;} |
| #define | class_P(_x_) CHAR(asChar(getAttrib(_x_, R_ClassSymbol))) |
| #define | CMJ CblasColMajor |
| #define | CTR CblasConjTrans |
| #define | DECLARE_AND_GET_X_SLOT(__C_TYPE, __SEXP) __C_TYPE *xx = __SEXP(GET_SLOT(x, Matrix_xSym)) |
| #define | diag_P(_x_) CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_diagSym), 0)) |
| #define | dngettext(pkg, String, StringP, N) (N > 1 ? StringP : String) |
| #define | FULL_TO_PACKED(TYPE) |
| #define | LFT CblasLeft |
| #define | LOW CblasLower |
| #define | Matrix_check_class_and_super R_check_class_and_super |
| #define | MATRIX_VALID_CHMfactor "dCHMsuper", "dCHMsimpl", "nCHMsuper", "nCHMsimpl" |
| #define | MATRIX_VALID_Csparse |
| #define | MATRIX_VALID_dense |
| #define | MATRIX_VALID_Rsparse |
| #define | MATRIX_VALID_Tsparse |
| #define | NTR CblasNoTrans |
| #define | NUN CblasNonUnit |
| #define | PACKED_LENGTH(n) ((n) * ((n) + 1))/2 |
| #define | PACKED_TO_FULL(TYPE) |
| #define | Real_kind(_x_) |
| #define | Real_KIND(_x_) |
| #define | Real_KIND2(_x_) |
| #define | RGT CblasRight |
| #define | RMJ CblasRowMajor |
| #define | SET_DimNames(dest, src) slot_dup(dest, src, Matrix_DimNamesSym) |
| #define | slot_dup(dest, src, sym) SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym))) |
| #define | slot_dup_if_has(dest, src, sym) |
| #define | slot_nonNull_dup(dest, src, sym) |
| #define | TRN CblasTrans |
| #define | UNT CblasUnit |
| #define | uplo_P(_x_) CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_uploSym), 0)) |
| #define | UPP CblasUpper |
Enumerations | |
| enum | CBLAS_DIAG { CblasNonUnit = 131, CblasUnit = 132 } |
| enum | CBLAS_ORDER { CblasRowMajor = 101, CblasColMajor = 102 } |
| enum | CBLAS_SIDE { CblasLeft = 141, CblasRight = 142 } |
| enum | CBLAS_TRANSPOSE { CblasNoTrans = 111, CblasTrans = 112, CblasConjTrans = 113 } |
| enum | CBLAS_UPLO { CblasUpper = 121, CblasLower = 122 } |
| enum | x_slot_kind { x_pattern = -1, x_double = 0, x_logical = 1, x_integer = 2, x_complex = 3 } |
Functions | |
| static R_INLINE SEXP | ALLOC_SLOT (SEXP obj, SEXP nm, SEXPTYPE type, int length) |
| Allocate an SEXP of given type and length, assign it as slot nm in the object, and return the SEXP. | |
| static R_INLINE Rboolean | any_NA_in_x (SEXP obj) |
| Check if slot(obj, "x") contains any NA (or NaN). | |
| SEXP | as_det_obj (double val, int log, int sign) |
| SEXP | check_scalar_string (SEXP sP, char *vals, char *nm) |
| Check validity of 1-letter string from a set of possible values (typically used in S4 validity method) | |
| void | d_packed_getDiag (double *dest, SEXP x, int n) |
| Copy the diagonal elements of the packed denseMatrix x to dest. | |
| SEXP | dense_nonpacked_validate (SEXP obj) |
| SEXP | dup_mMatrix_as_dgeMatrix (SEXP A) |
| SEXP | dup_mMatrix_as_geMatrix (SEXP A) |
| Rboolean | equal_string_vectors (SEXP s1, SEXP s2) |
| static R_INLINE 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. | |
| FULL_TO_PACKED (double) | |
| FULL_TO_PACKED (int) | |
| double | get_double_by_name (SEXP obj, char *nm) |
| SEXP | get_factors (SEXP obj, char *nm) |
| void | l_packed_getDiag (int *dest, SEXP x, int n) |
| SEXP | m_encodeInd (SEXP ij, SEXP di, 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 chk_bnds) |
| Encode Matrix index (i,j) |--> i + j * nrow {i,j : 0-origin}. | |
| void | make_d_matrix_symmetric (double *to, SEXP from) |
| void | make_d_matrix_triangular (double *x, SEXP from) |
| void | make_i_matrix_symmetric (int *to, SEXP from) |
| void | make_i_matrix_triangular (int *x, SEXP from) |
| static R_INLINE int | Matrix_check_class (char *class, const char **valid) |
| Return the 0-based index of a string match in a vector of strings terminated by an empty string. | |
| int | Matrix_check_class_etc (SEXP x, const char **valid) |
| These are the ones users should use -- is() versions, also looking at super classes: | |
| SEXP | Matrix_expand_pointers (SEXP pP) |
| SEXP | Matrix_getElement (SEXP list, char *nm) |
| Return the element of a given name from a named list. | |
| static R_INLINE SEXP | mMatrix_as_dgeMatrix (SEXP A) |
| static R_INLINE SEXP | mMatrix_as_geMatrix (SEXP A) |
| SEXP | new_dgeMatrix (int nrow, int ncol) |
| static R_INLINE int | packed_ncol (int len) |
| Check for valid length of a packed triangular array and return the corresponding number of columns. | |
| PACKED_TO_FULL (int) | |
| PACKED_TO_FULL (double) | |
| SEXP | set_double_by_name (SEXP obj, double val, char *nm) |
| SEXP | set_factors (SEXP obj, SEXP val, char *nm) |
| SEXP | symmetricMatrix_validate (SEXP obj) |
| void | tr_d_packed_getDiag (double *dest, SEXP x) |
| void | tr_l_packed_getDiag (int *dest, SEXP x) |
| SEXP | triangularMatrix_validate (SEXP obj) |
| #define _ | ( | String | ) | (String) |
Definition at line 20 of file Mutils.h.
Referenced by as_cholmod_factor(), as_cholmod_sparse(), as_cholmod_triplet(), check_scalar_string(), checkGivens(), chm_dense_to_matrix(), chm_dense_to_SEXP(), chm_diagN2U(), chm_factor_ldetL2(), chm_factor_to_SEXP(), chm_factor_update(), CHM_set_common_env(), chm_sparse_to_SEXP(), chm_triplet_to_SEXP(), CHMfactor_solve(), CHMfactor_spsolve(), CHMfactor_to_sparse(), compressed_to_TMatrix(), create_Csparse(), csp_eye(), Csparse_crossprod(), Csparse_drop(), Csparse_MatrixMarket(), Csparse_subassign(), Csparse_submatrix(), Csparse_symmetric_to_general(), Csparse_validate_(), ddense_skewpart(), ddense_symmpart(), dense_band(), dense_nonpacked_validate(), dense_to_symmetric(), dgCMatrix_cholsol(), dgCMatrix_matrix_solve(), dgCMatrix_QR(), dgCMatrix_qrsol(), dgeMatrix_determinant(), dgeMatrix_dgeMatrix_crossprod(), dgeMatrix_dtpMatrix_mm(), dgeMatrix_exp(), dgeMatrix_LU_(), dgeMatrix_matrix_crossprod(), dgeMatrix_matrix_mm(), dgeMatrix_matrix_solve(), dgeMatrix_rcond(), dgeMatrix_Schur(), dgeMatrix_solve(), dgeMatrix_validate(), diag_tC_ptr(), dMatrix_validate(), dpoMatrix_chol(), dpoMatrix_dgeMatrix_solve(), dpoMatrix_matrix_solve(), dpoMatrix_validate(), dppMatrix_chol(), dppMatrix_matrix_solve(), dsCMatrix_to_dgTMatrix(), dspMatrix_matrix_mm(), dspMatrix_matrix_solve(), dspMatrix_trf(), dspMatrix_validate(), dsyMatrix_matrix_mm(), dsyMatrix_matrix_solve(), dsyMatrix_trf(), dtCMatrix_matrix_solve(), dtCMatrix_sparse_solve(), dtpMatrix_matrix_mm(), dtpMatrix_matrix_solve(), dtpMatrix_validate(), dtrMatrix_dtrMatrix_mm(), dtrMatrix_matrix_mm(), dtrMatrix_matrix_solve(), dup_mMatrix_as_dgeMatrix(), dup_mMatrix_as_geMatrix(), equal_string_vectors(), get_double_by_name(), get_factors(), getGivens(), install_lu(), internal_chm_factor(), La_norm_type(), La_rcond_type(), lapack_qr(), left_cyclic(), lsq_dense_Chol(), lsq_dense_QR(), m_encodeInd(), m_encodeInd2(), Matrix_as_cs(), Matrix_check_class_etc(), Matrix_cs_to_SEXP(), nz2Csparse(), packed_ncol(), R_cholmod_error(), R_cholmod_start(), R_init_Matrix(), R_to_CMatrix(), Rsparse_validate(), set_double_by_name(), set_factors(), sparseQR_Qmult(), sparseQR_validate(), symmetricMatrix_validate(), tCMatrix_validate(), triangularMatrix_validate(), tRMatrix_validate(), Tsparse_validate(), tTMatrix_validate(), xCMatrix_validate(), xRMatrix_validate(), and xTMatrix_validate().
| #define _dspV_ |
| #define Alloca | ( | n, | |
| t | |||
| ) | (t *) alloca( (size_t) ( (n) * sizeof(t) ) ) |
Definition at line 33 of file Mutils.h.
Referenced by dgCMatrix_matrix_solve(), dgeMatrix_colsums(), dgeMatrix_Schur(), dgeMatrix_svd(), dspMatrix_matrix_mm(), dsyMatrix_matrix_mm(), dsyMatrix_trf(), dtCMatrix_sparse_solve(), LU_expand(), sparseQR_coef(), and sparseQR_Qmult().
| #define AZERO | ( | x, | |
| n | |||
| ) | {int _I_, _SZ_ = (n); for(_I_ = 0; _I_ < _SZ_; _I_++) (x)[_I_] = 0;} |
Definition at line 100 of file Mutils.h.
Referenced by dgeMatrix_crossprod(), dgeMatrix_exp(), dpoMatrix_chol(), dsyMatrix_trf(), install_diagonal(), and install_diagonal_int().
| #define class_P | ( | _x_ | ) | CHAR(asChar(getAttrib(_x_, R_ClassSymbol))) |
Definition at line 125 of file Mutils.h.
Referenced by compressed_to_TMatrix(), Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), dense_band(), dense_to_symmetric(), dup_mMatrix_as_dgeMatrix(), dup_mMatrix_as_geMatrix(), mMatrix_as_dgeMatrix(), mMatrix_as_geMatrix(), nz2Csparse(), R_to_CMatrix(), and Tsparse_diagU2N().
| #define DECLARE_AND_GET_X_SLOT | ( | __C_TYPE, | |
| __SEXP | |||
| ) | __C_TYPE *xx = __SEXP(GET_SLOT(x, Matrix_xSym)) |
| #define diag_P | ( | _x_ | ) | CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_diagSym), 0)) |
Definition at line 124 of file Mutils.h.
Referenced by as_cholmod_sparse(), as_cholmod_triplet(), Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), Csparse_to_nz_pattern(), Csparse_to_Tsparse(), Csparse_transpose(), dgeMatrix_dtpMatrix_mm(), dtpMatrix_matrix_mm(), dtpMatrix_matrix_solve(), dtpMatrix_rcond(), dtpMatrix_solve(), dtrMatrix_dtrMatrix_mm(), dtrMatrix_matrix_mm(), dtrMatrix_matrix_solve(), dtrMatrix_rcond(), dtrMatrix_solve(), get_norm(), install_diagonal(), install_diagonal_int(), Matrix_as_cs(), tr_d_packed_getDiag(), tr_l_packed_getDiag(), Tsparse_diagU2N(), and Tsparse_to_Csparse().
| #define dngettext | ( | pkg, | |
| String, | |||
| StringP, | |||
| N | |||
| ) | (N > 1 ? StringP : String) |
Definition at line 22 of file Mutils.h.
Referenced by dMatrix_validate().
| #define FULL_TO_PACKED | ( | TYPE | ) |
TYPE *full_to_packed_ ## TYPE(TYPE *dest, const TYPE *src, int n, \ enum CBLAS_UPLO uplo, enum CBLAS_DIAG diag)
| #define LOW CblasLower |
Definition at line 51 of file Mutils.h.
Referenced by dspMatrix_as_dsyMatrix(), dsyMatrix_as_dspMatrix(), dtpMatrix_as_dtrMatrix(), dtrMatrix_as_dtpMatrix(), dup_mMatrix_as_geMatrix(), lspMatrix_as_lsyMatrix(), lsyMatrix_as_lspMatrix(), ltpMatrix_as_ltrMatrix(), and ltrMatrix_as_ltpMatrix().
| #define Matrix_check_class_and_super R_check_class_and_super |
Definition at line 314 of file Mutils.h.
Referenced by Matrix_check_class_etc().
| #define MATRIX_VALID_CHMfactor "dCHMsuper", "dCHMsimpl", "nCHMsuper", "nCHMsimpl" |
Definition at line 285 of file Mutils.h.
Referenced by as_cholmod_factor().
| #define MATRIX_VALID_Csparse |
"dgCMatrix", "dsCMatrix", "dtCMatrix", \ "lgCMatrix", "lsCMatrix", "ltCMatrix", \ "ngCMatrix", "nsCMatrix", "ntCMatrix", \ "zgCMatrix", "zsCMatrix", "ztCMatrix"
Definition at line 267 of file Mutils.h.
Referenced by compressed_to_TMatrix().
| #define MATRIX_VALID_dense |
| #define MATRIX_VALID_Rsparse |
"dgRMatrix", "dsRMatrix", "dtRMatrix", \ "lgRMatrix", "lsRMatrix", "ltRMatrix", \ "ngRMatrix", "nsRMatrix", "ntRMatrix", \ "zgRMatrix", "zsRMatrix", "ztRMatrix"
Definition at line 279 of file Mutils.h.
Referenced by compressed_to_TMatrix(), and R_to_CMatrix().
| #define MATRIX_VALID_Tsparse |
"dgTMatrix", "dsTMatrix", "dtTMatrix", \ "lgTMatrix", "lsTMatrix", "ltTMatrix", \ "ngTMatrix", "nsTMatrix", "ntTMatrix", \ "zgTMatrix", "zsTMatrix", "ztTMatrix"
Definition at line 273 of file Mutils.h.
Referenced by as_cholmod_triplet().
| #define NUN CblasNonUnit |
Definition at line 52 of file Mutils.h.
Referenced by dsyMatrix_as_dspMatrix(), dtrMatrix_as_dtpMatrix(), lsyMatrix_as_lspMatrix(), and ltrMatrix_as_ltpMatrix().
| #define PACKED_TO_FULL | ( | TYPE | ) |
TYPE *packed_to_full_ ## TYPE(TYPE *dest, const TYPE *src, \ int n, enum CBLAS_UPLO uplo)
| #define Real_kind | ( | _x_ | ) |
(isReal(GET_SLOT(_x_, Matrix_xSym)) ? 0 : \ (isLogical(GET_SLOT(_x_, Matrix_xSym)) ? 1 : -1))
Definition at line 139 of file Mutils.h.
Referenced by Csparse_band(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), Csparse_general_to_symmetric(), Csparse_horzcat(), Csparse_submatrix(), Csparse_symmetric_to_general(), Csparse_to_dense(), Csparse_to_Tsparse(), Csparse_transpose(), Csparse_vertcat(), Tsparse_to_Csparse(), and Tsparse_to_tCsparse().
| #define Real_KIND | ( | _x_ | ) |
| #define Real_KIND2 | ( | _x_ | ) |
Definition at line 135 of file Mutils.h.
Referenced by dense_to_Csparse().
| #define SET_DimNames | ( | dest, | |
| src | |||
| ) | slot_dup(dest, src, Matrix_DimNamesSym) |
Definition at line 120 of file Mutils.h.
Referenced by compressed_to_TMatrix(), dtCMatrix_sparse_solve(), dtrMatrix_dtrMatrix_mm(), R_to_CMatrix(), and Tsparse_diagU2N().
| #define slot_dup | ( | dest, | |
| src, | |||
| sym | |||
| ) | SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym))) |
Definition at line 107 of file Mutils.h.
Referenced by compressed_to_TMatrix(), dgeMatrix_LU_(), dgeMatrix_solve(), dpoMatrix_dgeMatrix_solve(), dpoMatrix_solve(), dppMatrix_chol(), dppMatrix_solve(), dspMatrix_solve(), dspMatrix_trf(), dsyMatrix_solve(), dtCMatrix_sparse_solve(), dtrMatrix_chol2inv(), dtTMatrix_as_dtrMatrix(), lsyMatrix_as_lgeMatrix(), ltrMatrix_as_lgeMatrix(), ltTMatrix_as_ltrMatrix(), ntTMatrix_as_ntrMatrix(), nz2Csparse(), R_to_CMatrix(), and Tsparse_diagU2N().
| #define slot_dup_if_has | ( | dest, | |
| src, | |||
| sym | |||
| ) |
if(R_has_slot(src, sym)) \
SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))
Definition at line 114 of file Mutils.h.
Referenced by nz2Csparse().
| #define slot_nonNull_dup | ( | dest, | |
| src, | |||
| sym | |||
| ) |
| #define UNT CblasUnit |
Definition at line 53 of file Mutils.h.
Referenced by dtrMatrix_as_dtpMatrix(), and ltrMatrix_as_ltpMatrix().
| #define uplo_P | ( | _x_ | ) | CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_uploSym), 0)) |
Definition at line 123 of file Mutils.h.
Referenced by Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), Csparse_to_nz_pattern(), Csparse_to_Tsparse(), Csparse_transpose(), dgeMatrix_dtpMatrix_mm(), dpoMatrix_dgeMatrix_solve(), dpoMatrix_matrix_solve(), dpoMatrix_rcond(), dpoMatrix_solve(), dppMatrix_matrix_solve(), dppMatrix_rcond(), dppMatrix_solve(), dspMatrix_matrix_mm(), dspMatrix_matrix_solve(), dspMatrix_rcond(), dspMatrix_solve(), dsyMatrix_matrix_mm(), dsyMatrix_matrix_solve(), dsyMatrix_rcond(), dsyMatrix_solve(), dtCMatrix_matrix_solve(), dtCMatrix_sparse_solve(), dtpMatrix_matrix_mm(), dtpMatrix_matrix_solve(), dtpMatrix_rcond(), dtpMatrix_solve(), dtrMatrix_chol2inv(), dtrMatrix_dtrMatrix_mm(), dtrMatrix_matrix_mm(), dtrMatrix_matrix_solve(), dtrMatrix_rcond(), dtrMatrix_solve(), dup_mMatrix_as_geMatrix(), get_norm(), get_norm_sp(), get_norm_sy(), R_to_CMatrix(), stype(), tCMatrix_validate(), tRMatrix_validate(), Tsparse_to_Csparse(), and tTMatrix_validate().
| #define UPP CblasUpper |
Definition at line 50 of file Mutils.h.
Referenced by dspMatrix_as_dsyMatrix(), dsyMatrix_as_dspMatrix(), dtpMatrix_as_dtrMatrix(), dtrMatrix_as_dtpMatrix(), dup_mMatrix_as_geMatrix(), lspMatrix_as_lsyMatrix(), lsyMatrix_as_lspMatrix(), ltpMatrix_as_ltrMatrix(), and ltrMatrix_as_ltpMatrix().
| enum CBLAS_DIAG |
| enum CBLAS_ORDER |
| enum CBLAS_SIDE |
| enum CBLAS_TRANSPOSE |
| enum CBLAS_UPLO |
| enum x_slot_kind |
| static R_INLINE SEXP ALLOC_SLOT | ( | SEXP | obj, |
| SEXP | nm, | ||
| SEXPTYPE | type, | ||
| int | length | ||
| ) | [static] |
Allocate an SEXP of given type and length, assign it as slot nm in the object, and return the SEXP.
The validity of this function depends on SET_SLOT not duplicating val when NAMED(val) == 0. If this behavior changes then ALLOC_SLOT must use SET_SLOT followed by GET_SLOT to ensure that the value returned is indeed the SEXP in the slot. NOTE: GET_SLOT(x, what) :== R_do_slot (x, what) ---- SET_SLOT(x, what, value) :== R_do_slot_assign(x, what, value) and the R_do_slot* are in src/main/attrib.c
| obj | object in which to assign the slot |
| nm | name of the slot, as an R name object |
| type | type of SEXP to allocate |
| length | length of SEXP to allocate |
Definition at line 184 of file Mutils.h.
Referenced by chm_dense_to_SEXP(), chm_factor_to_SEXP(), chm_sparse_to_SEXP(), chm_triplet_to_SEXP(), compressed_to_TMatrix(), create_Csparse(), Csparse_subassign(), dgCMatrix_QR(), dgeMatrix_crossprod(), dgeMatrix_LU_(), dgeMatrix_matrix_mm(), dpoMatrix_chol(), dspMatrix_as_dsyMatrix(), dspMatrix_trf(), dsyMatrix_as_dspMatrix(), dsyMatrix_trf(), dtCMatrix_matrix_solve(), dtCMatrix_sparse_solve(), dtpMatrix_as_dtrMatrix(), dtrMatrix_as_dtpMatrix(), dtrMatrix_dtrMatrix_mm(), dup_mMatrix_as_geMatrix(), gCMatrix_colSums(), install_lu(), lspMatrix_as_lsyMatrix(), lsyMatrix_as_lspMatrix(), ltpMatrix_as_ltrMatrix(), ltrMatrix_as_ltpMatrix(), LU_expand(), Matrix_cs_to_SEXP(), new_dgeMatrix(), nz2Csparse(), R_to_CMatrix(), and Tsparse_diagU2N().

| static R_INLINE Rboolean any_NA_in_x | ( | SEXP | obj | ) | [static] |
Check if slot(obj, "x") contains any NA (or NaN).
| obj | a 'Matrix' object with a (double precision) 'x' slot. |
Definition at line 221 of file Mutils.h.
References Matrix_xSym.
Referenced by get_norm().

| SEXP as_det_obj | ( | double | val, |
| int | log, | ||
| int | sign | ||
| ) |
Definition at line 92 of file Mutils.c.
Referenced by dgeMatrix_determinant().

| SEXP check_scalar_string | ( | SEXP | sP, |
| char * | vals, | ||
| char * | nm | ||
| ) |
Check validity of 1-letter string from a set of possible values (typically used in S4 validity method)
| sP | |
| vals | a string containing the possible valid letters |
| nm | the name of the slot being checked |
Definition at line 236 of file Mutils.c.
Referenced by symmetricMatrix_validate(), and triangularMatrix_validate().

| void d_packed_getDiag | ( | double * | dest, |
| SEXP | x, | ||
| int | n | ||
| ) |
Copy the diagonal elements of the packed denseMatrix x to dest.
| dest | vector of length ncol(x) |
| x | pointer to an object representing a packed array |
| n | number of columns in the matrix represented by x |
Definition at line 363 of file Mutils.c.
References END_packed_getDiag, and Matrix_xSym.
Referenced by dtpMatrix_getDiag(), and tr_d_packed_getDiag().

| SEXP dense_nonpacked_validate | ( | SEXP | obj | ) |
Definition at line 292 of file Mutils.c.
References _, Matrix_DimSym, and Matrix_xSym.
Referenced by dgeMatrix_validate(), dsyMatrix_validate(), and dtrMatrix_validate().

| SEXP dup_mMatrix_as_dgeMatrix | ( | SEXP | A | ) |
Definition at line 679 of file Mutils.c.
References _, class_P, ddense_CLASSES, DUP_MMATRIX_ddense_CASES, DUP_MMATRIX_NON_CLASS, DUP_MMATRIX_SET_1, Matrix_check_class_etc(), Matrix_DimNamesSym, and Matrix_DimSym.
Referenced by CHMfactor_solve(), ddense_skewpart(), ddense_symmpart(), dgCMatrix_matrix_solve(), dgeMatrix_matrix_solve(), dppMatrix_matrix_solve(), dspMatrix_matrix_mm(), dspMatrix_matrix_solve(), dsyMatrix_matrix_mm(), dsyMatrix_matrix_solve(), dtpMatrix_matrix_mm(), dtpMatrix_matrix_solve(), dtrMatrix_dtrMatrix_mm(), dtrMatrix_matrix_mm(), dtrMatrix_matrix_solve(), mMatrix_as_dgeMatrix(), sparseQR_coef(), sparseQR_qty(), and sparseQR_resid_fitted().


| SEXP dup_mMatrix_as_geMatrix | ( | SEXP | A | ) |
Definition at line 519 of file Mutils.c.
References _, ALLOC_SLOT(), class_P, ddense_CLASSES, DUP_MMATRIX_ddense_CASES, DUP_MMATRIX_NON_CLASS, DUP_MMATRIX_SET_1, install_diagonal_int(), ldense_CLASSES, LOW, make_i_matrix_symmetric(), make_i_matrix_triangular(), Matrix_check_class_etc(), Matrix_DimNamesSym, Matrix_DimSym, Matrix_xSym, ndense_CLASSES, uplo_P, and UPP.
Referenced by dense_band(), dense_to_symmetric(), and mMatrix_as_geMatrix().


| Rboolean equal_string_vectors | ( | SEXP | s1, |
| SEXP | s2 | ||
| ) |
Definition at line 268 of file Mutils.c.
References _.
Referenced by ddense_skewpart(), ddense_symmpart(), and dense_to_symmetric().

| static R_INLINE int* expand_cmprPt | ( | int | ncol, |
| const int | mp[], | ||
| int | mj[] | ||
| ) | [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 203 of file Mutils.h.
Referenced by compressed_non_0_ij(), compressed_to_TMatrix(), Matrix_expand_pointers(), tCMatrix_validate(), and tRMatrix_validate().

| FULL_TO_PACKED | ( | double | ) |
| FULL_TO_PACKED | ( | int | ) |
| double get_double_by_name | ( | SEXP | obj, |
| char * | nm | ||
| ) |
| SEXP get_factors | ( | SEXP | obj, |
| char * | nm | ||
| ) |
Definition at line 109 of file Mutils.c.
References _, and Matrix_factorSym.
Referenced by dgCMatrix_LU(), dgCMatrix_matrix_solve(), dgeMatrix_LU_(), dpoMatrix_chol(), dppMatrix_chol(), dspMatrix_trf(), and dsyMatrix_trf().

| void l_packed_getDiag | ( | int * | dest, |
| SEXP | x, | ||
| int | n | ||
| ) |
Definition at line 380 of file Mutils.c.
References END_packed_getDiag, and Matrix_xSym.
Referenced by ltpMatrix_getDiag(), and tr_l_packed_getDiag().

| SEXP m_encodeInd | ( | SEXP | ij, |
| SEXP | di, | ||
| 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 738 of file Mutils.c.
References _, and do_ii_FILL.
| SEXP m_encodeInd2 | ( | SEXP | i, |
| SEXP | j, | ||
| SEXP | di, | ||
| 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' |
| di,: | dim(.), i.e. length 2 integer vector |
| chk_bnds,: | logical indicating 0 <= ij[,k] < di[k] need to be checked. |
Definition at line 796 of file Mutils.c.
References _, and do_ii_FILL.
| void make_d_matrix_symmetric | ( | double * | to, |
| SEXP | from | ||
| ) |
| void make_d_matrix_triangular | ( | double * | x, |
| SEXP | from | ||
| ) |
Referenced by dtrMatrix_as_matrix(), dtrMatrix_dtrMatrix_mm(), and LU_expand().

| void make_i_matrix_symmetric | ( | int * | to, |
| SEXP | from | ||
| ) |
Referenced by dup_mMatrix_as_geMatrix(), and lsyMatrix_as_lgeMatrix().

| void make_i_matrix_triangular | ( | int * | x, |
| SEXP | from | ||
| ) |
Referenced by dup_mMatrix_as_geMatrix(), and ltrMatrix_as_lgeMatrix().

| static R_INLINE int Matrix_check_class | ( | char * | class, |
| const char ** | valid | ||
| ) | [static] |
Return the 0-based index of a string match in a vector of strings terminated by an empty string.
Returns -1 for no match.
| class | string to match |
| valid | vector of possible matches terminated by an empty string |
Definition at line 297 of file Mutils.h.
Referenced by Matrix_cs_to_SEXP().

| int Matrix_check_class_etc | ( | SEXP | x, |
| const char ** | valid | ||
| ) |
These are the ones users should use -- is() versions, also looking at super classes:
These are the ones users should use -- is() versions, also looking at super classes:
Returns -1 for no match. Strives to find the correct environment() for is().
| x | an R object, about which we want is(x, .) information. |
| valid | vector of possible matches terminated by an empty string. |
Definition at line 889 of file Mutils.c.
References _, and Matrix_check_class_and_super.
Referenced by as_cholmod_factor(), as_cholmod_sparse(), as_cholmod_triplet(), compressed_to_TMatrix(), Csparse_subassign(), dup_mMatrix_as_dgeMatrix(), dup_mMatrix_as_geMatrix(), Matrix_as_cs(), R_init_Matrix(), R_to_CMatrix(), and Tsparse_diagU2N().

| SEXP Matrix_expand_pointers | ( | SEXP | pP | ) |
Definition at line 421 of file Mutils.c.
References expand_cmprPt().

| SEXP Matrix_getElement | ( | SEXP | list, |
| char * | nm | ||
| ) |
| static R_INLINE SEXP mMatrix_as_dgeMatrix | ( | SEXP | A | ) | [static] |
Definition at line 249 of file Mutils.h.
References class_P, and dup_mMatrix_as_dgeMatrix().
Referenced by Csparse_dense_crossprod(), Csparse_dense_prod(), dgeMatrix_matrix_mm(), and dsCMatrix_matrix_solve().


| static R_INLINE SEXP mMatrix_as_geMatrix | ( | SEXP | A | ) | [static] |
Definition at line 255 of file Mutils.h.
References class_P, and dup_mMatrix_as_geMatrix().
Referenced by dense_to_Csparse().


| SEXP new_dgeMatrix | ( | int | nrow, |
| int | ncol | ||
| ) |
Definition at line 714 of file Mutils.c.
References ALLOC_SLOT(), Matrix_DimNamesSym, Matrix_DimSym, and Matrix_xSym.

| static R_INLINE int packed_ncol | ( | int | len | ) | [static] |
| PACKED_TO_FULL | ( | int | ) |
| PACKED_TO_FULL | ( | double | ) |
| SEXP set_double_by_name | ( | SEXP | obj, |
| double | val, | ||
| char * | nm | ||
| ) |
| SEXP set_factors | ( | SEXP | obj, |
| SEXP | val, | ||
| char * | nm | ||
| ) |
Definition at line 129 of file Mutils.c.
References _, and Matrix_factorSym.
Referenced by dgeMatrix_LU_(), dpoMatrix_chol(), dppMatrix_chol(), dspMatrix_trf(), dsyMatrix_trf(), install_lu(), and internal_chm_factor().

| SEXP symmetricMatrix_validate | ( | SEXP | obj | ) |
Definition at line 3 of file dsyMatrix.c.
References _, check_scalar_string(), Matrix_DimSym, and Matrix_uploSym.
Referenced by dspMatrix_validate().


| void tr_d_packed_getDiag | ( | double * | dest, |
| SEXP | x | ||
| ) |
Definition at line 389 of file Mutils.c.
References d_packed_getDiag(), diag_P, and Matrix_DimSym.

| void tr_l_packed_getDiag | ( | int * | dest, |
| SEXP | x | ||
| ) |
Definition at line 405 of file Mutils.c.
References diag_P, l_packed_getDiag(), and Matrix_DimSym.

| SEXP triangularMatrix_validate | ( | SEXP | obj | ) |
Definition at line 5 of file dtrMatrix.c.
References _, check_scalar_string(), Matrix_diagSym, Matrix_DimSym, and Matrix_uploSym.
Referenced by dtpMatrix_validate().

