|
Matrix $Rev: 2718 $ at $LastChangedDate: 2011-10-06 11:45:17 +0200 (Thu, 06 Oct 2011) $
|


Go to the source code of this file.
Defines | |
| #define | AS_CHM_DN(x) as_cholmod_dense ((CHM_DN)alloca(sizeof(cholmod_dense)), x ) |
| #define | AS_CHM_FR(x) as_cholmod_factor ((CHM_FR)alloca(sizeof(cholmod_factor)), x ) |
| #define | AS_CHM_SP(x) as_cholmod_sparse ((CHM_SP)alloca(sizeof(cholmod_sparse)), x, TRUE, FALSE) |
| #define | AS_CHM_SP__(x) as_cholmod_sparse ((CHM_SP)alloca(sizeof(cholmod_sparse)), x, FALSE, FALSE) |
| #define | AS_CHM_TR(x) as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)),x, TRUE) |
| #define | AS_CHM_TR__(x) as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)), x, FALSE) |
| #define | N_AS_CHM_DN(x, nr, nc) M_numeric_as_chm_dense((CHM_DN)alloca(sizeof(cholmod_dense)), x , nr, nc ) |
Typedefs | |
| typedef cholmod_common * | CHM_CM |
| typedef cholmod_dense * | CHM_DN |
| typedef cholmod_factor * | CHM_FR |
| typedef cholmod_sparse * | CHM_SP |
| typedef cholmod_triplet * | CHM_TR |
| typedef const cholmod_dense * | const_CHM_DN |
| typedef const cholmod_factor * | const_CHM_FR |
| typedef const cholmod_sparse * | const_CHM_SP |
| typedef const cholmod_triplet * | const_CHM_TR |
Functions | |
| CHM_DN | as_cholmod_dense (CHM_DN ans, SEXP x) |
| Populate ans with the pointers from x and modify its scalar elements accordingly. | |
| CHM_FR | as_cholmod_factor (CHM_FR ans, SEXP x) |
| Populate ans with the pointers from x and modify its scalar elements accordingly. | |
| CHM_SP | as_cholmod_sparse (CHM_SP ans, SEXP x, Rboolean check_Udiag, Rboolean sort_in_place) |
| Populate ans with the pointers from x and modify its scalar elements accordingly. | |
| CHM_TR | as_cholmod_triplet (CHM_TR ans, SEXP x, Rboolean check_Udiag) |
| Populate ans with the pointers from x and modify its scalar elements accordingly. | |
| CHM_DN | as_cholmod_x_dense (CHM_DN ans, SEXP x) |
| Rboolean | check_sorted_chm (CHM_SP A) |
| SEXP | chm_dense_to_matrix (CHM_DN a, int dofree, SEXP dn) |
| Copy the contents of a to a matrix object and, optionally, free a or free both a and its pointer to its contents. | |
| SEXP | chm_dense_to_SEXP (CHM_DN a, int dofree, int Rkind, SEXP dn) |
| Copy the contents of a to an appropriate denseMatrix object and, optionally, free a or free both a and its pointer to its contents. | |
| void | chm_diagN2U (CHM_SP chx, int uploT, Rboolean do_realloc) |
| Drop the (unit) diagonal entries from a cholmod_sparse matrix. | |
| static R_INLINE Rboolean | chm_factor_ok (CHM_FR f) |
| SEXP | chm_factor_to_SEXP (CHM_FR f, int dofree) |
| Copy the contents of f to an appropriate CHMfactor object and, optionally, free f or free both f and its pointer to its contents. | |
| void | CHM_restore_common () |
| SEXP | CHM_set_common_env (SEXP rho) |
| SEXP | chm_sparse_to_SEXP (CHM_SP a, int dofree, int uploT, int Rkind, const char *diag, SEXP dn) |
| Copy the contents of a to an appropriate CsparseMatrix object and, optionally, free a or free both a and its the pointers to its contents. | |
| void | CHM_store_common () |
| SEXP | chm_triplet_to_SEXP (CHM_TR a, int dofree, int uploT, int Rkind, const char *diag, SEXP dn) |
| Copy the contents of a to an appropriate TsparseMatrix object and, optionally, free a or free both a and its the pointers to its contents. | |
| SEXP | CHMfactor_validate (SEXP obj) |
| SEXP | CHMsimpl_validate (SEXP obj) |
| SEXP | CHMsuper_validate (SEXP obj) |
| CHM_DN | numeric_as_chm_dense (CHM_DN ans, double *v, int nr, int nc) |
| void | R_cholmod_error (int status, const char *file, int line, const char *message) |
| int | R_cholmod_l_start (CHM_CM Common) |
| int | R_cholmod_start (CHM_CM Common) |
| Initialize the CHOLMOD library and replace the print and error functions by R-specific versions. | |
Variables | |
| cholmod_common | c |
| cholmod_common | cl |
| #define AS_CHM_DN | ( | x | ) | as_cholmod_dense ((CHM_DN)alloca(sizeof(cholmod_dense)), x ) |
Definition at line 41 of file chm_common.h.
Referenced by CHMfactor_solve(), Csparse_dense_crossprod(), Csparse_dense_prod(), dense_to_Csparse(), dgCMatrix_cholsol(), and dsCMatrix_matrix_solve().
| #define AS_CHM_FR | ( | x | ) | as_cholmod_factor ((CHM_FR)alloca(sizeof(cholmod_factor)), x ) |
Definition at line 42 of file chm_common.h.
Referenced by CHMfactor_ldetL2(), CHMfactor_ldetL2up(), CHMfactor_solve(), CHMfactor_spsolve(), CHMfactor_to_sparse(), CHMfactor_update(), destructive_CHM_update(), and internal_chm_factor().
| #define AS_CHM_SP | ( | x | ) | as_cholmod_sparse ((CHM_SP)alloca(sizeof(cholmod_sparse)), x, TRUE, FALSE) |
Definition at line 43 of file chm_common.h.
Referenced by Csparse_crossprod(), Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), Csparse_dense_crossprod(), Csparse_dense_prod(), Csparse_MatrixMarket(), Csparse_submatrix(), dgCMatrix_cholsol(), and dsCMatrix_Csparse_solve().
| #define AS_CHM_SP__ | ( | x | ) | as_cholmod_sparse ((CHM_SP)alloca(sizeof(cholmod_sparse)), x, FALSE, FALSE) |
Definition at line 46 of file chm_common.h.
Referenced by CHMfactor_ldetL2up(), CHMfactor_spsolve(), CHMfactor_update(), Csparse_band(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), Csparse_general_to_symmetric(), Csparse_horzcat(), Csparse_symmetric_to_general(), Csparse_to_dense(), Csparse_to_matrix(), Csparse_to_nz_pattern(), Csparse_to_Tsparse(), Csparse_transpose(), Csparse_vertcat(), destructive_CHM_update(), dsCMatrix_to_dgTMatrix(), gCMatrix_colSums(), and internal_chm_factor().
| #define AS_CHM_TR | ( | x | ) | as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)),x, TRUE) |
Definition at line 44 of file chm_common.h.
Referenced by Csparse_crossprod().
| #define AS_CHM_TR__ | ( | x | ) | as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)), x, FALSE) |
Definition at line 47 of file chm_common.h.
Referenced by Csparse_crossprod(), Tsparse_to_Csparse(), and Tsparse_to_tCsparse().
| #define N_AS_CHM_DN | ( | x, | |
| nr, | |||
| nc | |||
| ) | M_numeric_as_chm_dense((CHM_DN)alloca(sizeof(cholmod_dense)), x , nr, nc ) |
Definition at line 50 of file chm_common.h.
| typedef cholmod_common* CHM_CM |
Definition at line 18 of file chm_common.h.
| typedef cholmod_dense* CHM_DN |
Definition at line 19 of file chm_common.h.
| typedef cholmod_factor* CHM_FR |
Definition at line 21 of file chm_common.h.
| typedef cholmod_sparse* CHM_SP |
Definition at line 23 of file chm_common.h.
| typedef cholmod_triplet* CHM_TR |
Definition at line 25 of file chm_common.h.
| typedef const cholmod_dense* const_CHM_DN |
Definition at line 20 of file chm_common.h.
| typedef const cholmod_factor* const_CHM_FR |
Definition at line 22 of file chm_common.h.
| typedef const cholmod_sparse* const_CHM_SP |
Definition at line 24 of file chm_common.h.
| typedef const cholmod_triplet* const_CHM_TR |
Definition at line 26 of file chm_common.h.
Populate ans with the pointers from x and modify its scalar elements accordingly.
Note that later changes to the contents of ans will change the contents of the SEXP.
In most cases this function is called through the macro AS_CHM_DN. It is unusual to call it directly.
| ans | a CHM_DN pointer. |
| x | pointer to an object that inherits from (denseMatrix ^ generalMatrix) |
Definition at line 593 of file chm_common.c.
References _AS_cholmod_dense_1, _AS_cholmod_dense_2, Matrix_xSym, and RallocedREAL().
Referenced by R_init_Matrix().


Populate ans with the pointers from x and modify its scalar elements accordingly.
Note that later changes to the contents of ans will change the contents of the SEXP.
In most cases this function is called through the macro AS_CHM_FR. It is unusual to call it directly.
| ans | an CHM_FR object |
| x | pointer to an object that inherits from CHMfactor |
Definition at line 865 of file chm_common.c.
References _, c, Matrix_check_class_etc(), Matrix_iSym, Matrix_permSym, Matrix_pSym, MATRIX_VALID_CHMfactor, and Matrix_xSym.
Referenced by R_init_Matrix().


Populate ans with the pointers from x and modify its scalar elements accordingly.
Note that later changes to the contents of ans will change the contents of the SEXP.
In most cases this function is called through the macros AS_CHM_SP() or AS_CHM_SP__(). It is unusual to call it directly.
| ans | a CHM_SP pointer |
| x | pointer to an object that inherits from CsparseMatrix |
| check_Udiag | boolean - should a check for (and consequent expansion of) a unit diagonal be performed. |
| sort_in_place | boolean - if the i and x slots are to be sorted should they be sorted in place? If the i and x slots are pointers to an input SEXP they should not be modified. |
Definition at line 217 of file chm_common.c.
References _, c, check_sorted_chm(), chm2Ralloc(), diag_P, isValid_Csparse(), Matrix_check_class_etc(), Matrix_DimSym, Matrix_iSym, Matrix_pSym, stype(), xpt(), and xtype().
Referenced by Csparse_validate_(), and R_init_Matrix().


Populate ans with the pointers from x and modify its scalar elements accordingly.
Note that later changes to the contents of ans will change the contents of the SEXP.
In most cases this function is called through the macros AS_CHM_TR() or AS_CHM_TR__(). It is unusual to call it directly.
| ans | a CHM_TR pointer |
| x | pointer to an object that inherits from TsparseMatrix |
| check_Udiag | boolean - should a check for (and consequent expansion of) a unit diagonal be performed. |
Definition at line 410 of file chm_common.c.
References _, c, chTr2Ralloc(), diag_P, Matrix_check_class_etc(), Matrix_DimSym, Matrix_iSym, Matrix_jSym, MATRIX_VALID_Tsparse, stype(), xpt(), and xtype().

Definition at line 652 of file chm_common.c.
References _AS_cholmod_dense_1, _AS_cholmod_dense_2, Matrix_xSym, and RallocedREAL().

| Rboolean check_sorted_chm | ( | CHM_SP | A | ) |
Definition at line 141 of file chm_common.c.
Referenced by as_cholmod_sparse().

| SEXP chm_dense_to_matrix | ( | CHM_DN | a, |
| int | dofree, | ||
| SEXP | dn | ||
| ) |
Copy the contents of a to a matrix object and, optionally, free a or free both a and its pointer to its contents.
| a | cholmod_dense structure to be converted |
| dofree | 0 - don't free a; > 0 cholmod_free a; < 0 Free a |
| dn | either R_NilValue or an SEXP suitable for the Dimnames slot. |
Definition at line 809 of file chm_common.c.
Referenced by Csparse_to_matrix().

| SEXP chm_dense_to_SEXP | ( | CHM_DN | a, |
| int | dofree, | ||
| int | Rkind, | ||
| SEXP | dn | ||
| ) |
Copy the contents of a to an appropriate denseMatrix object and, optionally, free a or free both a and its pointer to its contents.
| a | matrix to be converted |
| dofree | 0 - don't free a; > 0 cholmod_free a; < 0 Free a |
| Rkind | type of R matrix to be generated (special to this function) |
| dn | -- dimnames [list(.,.) or NULL] |
Definition at line 736 of file chm_common.c.
References _, ALLOC_SLOT(), c, cl, Matrix_DimNamesSym, Matrix_DimSym, and Matrix_xSym.
Referenced by CHMfactor_solve(), Csparse_dense_crossprod(), Csparse_dense_prod(), Csparse_to_dense(), and dsCMatrix_matrix_solve().


| void chm_diagN2U | ( | CHM_SP | chx, |
| int | uploT, | ||
| Rboolean | do_realloc | ||
| ) |
Drop the (unit) diagonal entries from a cholmod_sparse matrix.
| chx | cholmod_sparse matrix. Note that the matrix "slots" are modified _in place_ |
| uploT | integer code (= +/- 1) indicating if chx is upper (+1) or lower (-1) triangular |
| do_realloc | Rboolean indicating, if a cholmod_sprealloc() should finalize the procedure; not needed, e.g. when the result is converted to a SEXP immediately afterwards. |
Definition at line 1019 of file chm_common.c.
References _, _i, _p, _x, and c.
Referenced by Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), and Csparse_diagN2U().

| static R_INLINE Rboolean chm_factor_ok | ( | CHM_FR | f | ) | [static] |
Definition at line 52 of file chm_common.h.
Referenced by chm_factor_to_SEXP(), dsCMatrix_Csparse_solve(), and dsCMatrix_matrix_solve().

| SEXP chm_factor_to_SEXP | ( | CHM_FR | f, |
| int | dofree | ||
| ) |
Copy the contents of f to an appropriate CHMfactor object and, optionally, free f or free both f and its pointer to its contents.
| f | cholmod_factor object to be converted |
| dofree | 0 - don't free a; > 0 cholmod_free a; < 0 Free a |
Definition at line 940 of file chm_common.c.
References _, ALLOC_SLOT(), c, chm_factor_ok(), Matrix_iSym, Matrix_pSym, Matrix_xSym, and xtype().
Referenced by CHMfactor_update(), destructive_CHM_update(), dgCMatrix_cholsol(), dsCMatrix_Cholesky(), internal_chm_factor(), and R_init_Matrix().


| void CHM_restore_common | ( | ) |
Definition at line 41 of file chm_common.c.
References c, chm_common_env, dboundSym, final_asisSym, final_llSym, final_monotonicSym, final_packSym, final_resymbolSym, final_superSym, grow0Sym, grow1Sym, grow2Sym, m0_ordSym, maxrankSym, nmethodsSym, postorderSym, prefer_upperSym, prefer_zomplexSym, quick_return_if_not_posdefSym, supernodal_switchSym, and supernodalSym.
Referenced by internal_chm_factor(), and R_cholmod_error().

| SEXP CHM_set_common_env | ( | SEXP | rho | ) |
Definition at line 65 of file chm_common.c.
References _, chm_common_env, CHM_store_common(), dboundSym, final_asisSym, final_llSym, final_monotonicSym, final_packSym, final_resymbolSym, final_superSym, grow0Sym, grow1Sym, grow2Sym, m0_ordSym, maxrankSym, nmethodsSym, postorderSym, prefer_upperSym, prefer_zomplexSym, quick_return_if_not_posdefSym, supernodal_switchSym, and supernodalSym.

| SEXP chm_sparse_to_SEXP | ( | CHM_SP | a, |
| int | dofree, | ||
| int | uploT, | ||
| int | Rkind, | ||
| const char * | diag, | ||
| SEXP | dn | ||
| ) |
Copy the contents of a to an appropriate CsparseMatrix object and, optionally, free a or free both a and its the pointers to its contents.
| a | (cholmod_sparse) matrix to be converted |
| dofree | 0 - don't free a; > 0 cholmod_free a; < 0 Free a |
| uploT | 0 - not triangular; > 0 upper triangular; < 0 lower |
| Rkind | - vector type to store for a->xtype == CHOLMOD_REAL, 0 - REAL; 1 - LOGICAL |
| diag | character string suitable for the diag slot of a triangular matrix (not accessed if uploT == 0). |
| dn | either R_NilValue or an SEXP suitable for the Dimnames slot. |
Definition at line 311 of file chm_common.c.
References _, ALLOC_SLOT(), c, cl, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_iSym, Matrix_pSym, Matrix_uploSym, and Matrix_xSym.
Referenced by CHMfactor_spsolve(), CHMfactor_to_sparse(), Csparse_band(), Csparse_crossprod(), Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), Csparse_general_to_symmetric(), Csparse_horzcat(), Csparse_submatrix(), Csparse_symmetric_to_general(), Csparse_to_nz_pattern(), Csparse_transpose(), Csparse_vertcat(), dense_to_Csparse(), dsCMatrix_chol(), dsCMatrix_Csparse_solve(), R_init_Matrix(), Tsparse_to_Csparse(), and Tsparse_to_tCsparse().


| void CHM_store_common | ( | ) |
Definition at line 16 of file chm_common.c.
References c, chm_common_env, dboundSym, final_asisSym, final_llSym, final_monotonicSym, final_packSym, final_resymbolSym, final_superSym, grow0Sym, grow1Sym, grow2Sym, m0_ordSym, maxrankSym, nmethodsSym, postorderSym, prefer_upperSym, prefer_zomplexSym, quick_return_if_not_posdefSym, supernodal_switchSym, and supernodalSym.
Referenced by CHM_set_common_env(), and internal_chm_factor().

| SEXP chm_triplet_to_SEXP | ( | CHM_TR | a, |
| int | dofree, | ||
| int | uploT, | ||
| int | Rkind, | ||
| const char * | diag, | ||
| SEXP | dn | ||
| ) |
Copy the contents of a to an appropriate TsparseMatrix object and, optionally, free a or free both a and its the pointers to its contents.
| a | matrix to be converted |
| dofree | 0 - don't free a; > 0 cholmod_free a; < 0 Free a |
| uploT | 0 - not triangular; > 0 upper triangular; < 0 lower |
| Rkind | - vector type to store for a->xtype == CHOLMOD_REAL, 0 - REAL; 1 - LOGICAL |
| diag | character string suitable for the diag slot of a triangular matrix (not accessed if uploT == 0). |
| dn | either R_NilValue or an SEXP suitable for the Dimnames slot. |
Definition at line 503 of file chm_common.c.
References _, ALLOC_SLOT(), c, cl, Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_iSym, Matrix_jSym, Matrix_uploSym, and Matrix_xSym.
Referenced by Csparse_to_Tsparse(), dsCMatrix_to_dgTMatrix(), and R_init_Matrix().


| SEXP CHMfactor_validate | ( | SEXP | obj | ) |
Definition at line 1087 of file chm_common.c.
| SEXP CHMsimpl_validate | ( | SEXP | obj | ) |
Definition at line 1092 of file chm_common.c.
| SEXP CHMsuper_validate | ( | SEXP | obj | ) |
Definition at line 1097 of file chm_common.c.
Definition at line 841 of file chm_common.c.
Referenced by R_init_Matrix().

| void R_cholmod_error | ( | int | status, |
| const char * | file, | ||
| int | line, | ||
| const char * | message | ||
| ) |
Definition at line 668 of file chm_common.c.
References _, and CHM_restore_common().
Referenced by R_cholmod_start().


| int R_cholmod_l_start | ( | CHM_CM | Common | ) |
| int R_cholmod_start | ( | CHM_CM | c | ) |
Initialize the CHOLMOD library and replace the print and error functions by R-specific versions.
| c | pointer to a cholmod_common structure to be initialized |
Definition at line 709 of file chm_common.c.
References _, R_cholmod_error(), and R_cholmod_printf().
Referenced by R_init_Matrix().


| cholmod_common c |
Definition at line 6 of file chm_common.c.
Referenced by as_cholmod_factor(), as_cholmod_sparse(), as_cholmod_triplet(), chm2Ralloc(), chm_dense_to_matrix(), chm_dense_to_SEXP(), chm_diagN2U(), chm_factor_to_SEXP(), chm_factor_update(), CHM_restore_common(), chm_sparse_to_SEXP(), CHM_store_common(), chm_triplet_to_SEXP(), CHMfactor_ldetL2up(), CHMfactor_solve(), CHMfactor_spsolve(), CHMfactor_to_sparse(), CHMfactor_update(), create_Csparse(), cs_chol(), cs_schol(), Csparse_band(), Csparse_crossprod(), Csparse_Csparse_crossprod(), Csparse_Csparse_prod(), Csparse_dense_crossprod(), Csparse_dense_prod(), Csparse_diagU2N(), Csparse_drop(), Csparse_general_to_symmetric(), Csparse_horzcat(), Csparse_MatrixMarket(), Csparse_submatrix(), Csparse_symmetric_to_general(), Csparse_to_dense(), Csparse_to_matrix(), Csparse_to_nz_pattern(), Csparse_to_Tsparse(), Csparse_transpose(), Csparse_vertcat(), dense_to_Csparse(), dgCMatrix_cholsol(), dsCMatrix_chol(), dsCMatrix_Csparse_solve(), dsCMatrix_LDL_D(), dsCMatrix_matrix_solve(), dsCMatrix_to_dgTMatrix(), gCMatrix_colSums(), internal_chm_factor(), Matrix_RLE_(), R_init_Matrix(), R_unload_Matrix(), Tsparse_to_Csparse(), and Tsparse_to_tCsparse().
| cholmod_common cl |
Definition at line 7 of file chm_common.c.
Referenced by chm_dense_to_SEXP(), chm_sparse_to_SEXP(), chm_triplet_to_SEXP(), Csparse_diagN2U(), Csparse_diagU2N(), Csparse_drop(), dense_band(), dense_to_symmetric(), and dtCMatrix_matrix_solve().