Last chance! 50% off unlimited learning
Sale ends in
"CHMfactor"
is a class of
CHOLMOD-based Cholesky factorizations of symmetric, sparse,
compressed, column-oriented matrices. Such a factorization is
simplicial (virtual class "CHMsimpl"
) or supernodal (virtual
class "CHMsuper"
). Objects that inherit from these classes are
either numeric factorizations (classes "dCHMsimpl"
and
"dCHMsuper"
) or symbolic factorizations (classes
"nCHMsimpl"
and "nCHMsuper"
).## S3 method for class 'CHMfactor':
update(object, parent, mult = 0, \dots)
"CHMfactor"
object."dsCMatrix "
matrix or
"dgCMatrix "
object with the same nonzero
pattern as the matrix that generated object
. If
parent
is a symmetric mmult
times the
identity matrix is (implicitly) added to parent
or
tcrossprod(parent)
before updating the decomposition
object
.new("dCHMsuper", ...)
but are more commonly created via Cholesky()
,
applied to dsCMatrix
or
lsCMatrix
objects.Cholesky
, also for examples;
class dgCMatrix
.## An example for the expand() method
n <- 1000; m <- 200; nnz <- 2000
set.seed(1)
M1 <- spMatrix(n, m,
i = sample(n, nnz, replace = TRUE),
j = sample(m, nnz, replace = TRUE),
x = round(rnorm(nnz),1))
XX <- crossprod(M1)
CX <- Cholesky(XX)
str(CX) ## a "dCHMsimpl" object
r <- expand(CX <- Cholesky(XX))
L.P <- with(r, crossprod(L,P)) ## == L'P
PLLP <- crossprod(L.P) ## == (L'P)' L'P == P'LL'P
stopifnot( all.equal(PLLP, XX) )
Run the code above in your browser using DataLab