Matrix  $Rev: 3071 $ at $LastChangedDate: 2015-03-26 15:35:47 +0100 (Thu, 26 Mar 2015) $
dsCMatrix.c File Reference
#include "dsCMatrix.h"
Include dependency graph for dsCMatrix.c:

Go to the source code of this file.

Functions

static int chk_nm (const char *nm, int perm, int LDL, int super)
 
static void chm_factor_name (char *nm, int perm, int LDL, int super)
 
SEXP dsCMatrix_chol (SEXP x, SEXP pivot)
 
SEXP dsCMatrix_Cholesky (SEXP Ap, SEXP perm, SEXP LDL, SEXP super, SEXP Imult)
 
SEXP dsCMatrix_Csparse_solve (SEXP a, SEXP b, SEXP LDL)
 
SEXP dsCMatrix_LDL_D (SEXP Ap, SEXP permP, SEXP resultKind)
 Fast version of getting at the diagonal matrix D of the (generalized) simplicial Cholesky LDL' decomposition of a (sparse symmetric) dsCMatrix. More...
 
SEXP dsCMatrix_matrix_solve (SEXP a, SEXP b, SEXP LDL)
 
SEXP dsCMatrix_to_dgTMatrix (SEXP x)
 
static CHM_FR internal_chm_factor (SEXP Ap, int perm, int LDL, int super, double Imult)
 Return a CHOLMOD copy of the cached Cholesky decomposition with the required perm, LDL and super attributes. More...
 
SEXP R_chkName_Cholesky (SEXP nm, SEXP perm, SEXP LDL, SEXP super)
 
SEXP R_chm_factor_name (SEXP perm, SEXP LDL, SEXP super)
 

Function Documentation

static int chk_nm ( const char *  nm,
int  perm,
int  LDL,
int  super 
)
static

Definition at line 3 of file dsCMatrix.c.

Referenced by internal_chm_factor(), and R_chkName_Cholesky().

Here is the caller graph for this function:

static void chm_factor_name ( char *  nm,
int  perm,
int  LDL,
int  super 
)
static

Definition at line 23 of file dsCMatrix.c.

References _.

Referenced by internal_chm_factor(), and R_chm_factor_name().

Here is the caller graph for this function:

SEXP dsCMatrix_chol ( SEXP  x,
SEXP  pivot 
)

Definition at line 121 of file dsCMatrix.c.

References c, chm_sparse_to_SEXP(), internal_chm_factor(), and Matrix_DimNamesSym.

Here is the call graph for this function:

SEXP dsCMatrix_Cholesky ( SEXP  Ap,
SEXP  perm,
SEXP  LDL,
SEXP  super,
SEXP  Imult 
)

Definition at line 149 of file dsCMatrix.c.

References chm_factor_to_SEXP(), and internal_chm_factor().

Here is the call graph for this function:

SEXP dsCMatrix_Csparse_solve ( SEXP  a,
SEXP  b,
SEXP  LDL 
)

Definition at line 197 of file dsCMatrix.c.

References AS_CHM_SP, c, chm_factor_ok(), chm_sparse_to_SEXP(), and internal_chm_factor().

Here is the call graph for this function:

SEXP dsCMatrix_LDL_D ( SEXP  Ap,
SEXP  permP,
SEXP  resultKind 
)

Fast version of getting at the diagonal matrix D of the (generalized) simplicial Cholesky LDL' decomposition of a (sparse symmetric) dsCMatrix.

Parameters
Apsymmetric CsparseMatrix
permPlogical indicating if permutation is allowed
resultKindan (SEXP) string indicating which kind of result is desired.
Returns
SEXP containing either the vector diagonal entries of D, or just sum_i D[i], prod_i D[i] or sum_i log(D[i]).

Definition at line 178 of file dsCMatrix.c.

References c, diag_tC_ptr(), and internal_chm_factor().

Here is the call graph for this function:

SEXP dsCMatrix_matrix_solve ( SEXP  a,
SEXP  b,
SEXP  LDL 
)

Definition at line 219 of file dsCMatrix.c.

References AS_CHM_DN, c, chm_dense_to_SEXP(), chm_factor_ok(), internal_chm_factor(), and mMatrix_as_dgeMatrix().

Here is the call graph for this function:

SEXP dsCMatrix_to_dgTMatrix ( SEXP  x)

Definition at line 242 of file dsCMatrix.c.

References _, AS_CHM_SP__, c, chm_triplet_to_SEXP(), and Matrix_DimNamesSym.

Here is the call graph for this function:

static CHM_FR internal_chm_factor ( SEXP  Ap,
int  perm,
int  LDL,
int  super,
double  Imult 
)
static

Return a CHOLMOD copy of the cached Cholesky decomposition with the required perm, LDL and super attributes.

If Imult is nonzero, update the numeric values before returning.

If no cached copy is available then evaluate one, cache it (for zero Imult), and return a copy.

Parameters
ApdsCMatrix object
perminteger indicating if permutation is required (!= 0), forbidden (0) [not yet: or optional (<0)]
LDLinteger indicating if the LDL' form is required (>0), forbidden (0) or optional (<0)
superinteger indicating if the supernodal form is required (>0), forbidden (0) or optional (<0)
Imultnumeric multiplier of I in |A + Imult * I|

Definition at line 62 of file dsCMatrix.c.

References _, AS_CHM_FR, AS_CHM_SP__, c, chk_nm(), chm_factor_name(), chm_factor_ok(), chm_factor_to_SEXP(), CHM_restore_common(), CHM_store_common(), Matrix_factorSym, and set_factors().

Referenced by dsCMatrix_chol(), dsCMatrix_Cholesky(), dsCMatrix_Csparse_solve(), dsCMatrix_LDL_D(), and dsCMatrix_matrix_solve().

Here is the call graph for this function:

Here is the caller graph for this function:

SEXP R_chkName_Cholesky ( SEXP  nm,
SEXP  perm,
SEXP  LDL,
SEXP  super 
)

Definition at line 16 of file dsCMatrix.c.

References chk_nm().

Here is the call graph for this function:

SEXP R_chm_factor_name ( SEXP  perm,
SEXP  LDL,
SEXP  super 
)

Definition at line 35 of file dsCMatrix.c.

References chm_factor_name().

Here is the call graph for this function: