chol
performs a Cholesky decomposition of a symmetric
positive definite sparse matrix x
of class
spam
. Currently, there is only the block sparse Cholesky
algorithm of Ng and Peyton (1993) implemented (method="NgPeyton"
).
To pivot/permute the matrix, you can choose between the multiple minimum
degree (pivot="MMD"
) or reverse Cuthill-Mckee (pivot="RCM"
)
from George and Lui (1981). It is also possible to furnish a specific
permutation in which case pivot
is a vector. For compatibility
reasons, pivot
can also take a logical in which for FALSE
no permutation is done and for TRUE
is equivalent to
MMD
.
Often the sparsity structure is fixed and does not change, but the
entries do. In those cases, we can update the Cholesky factor with
update.spam.chol.NgPeyton
by suppling a Cholesky factor and the
updated matrix. Notice that the structure is effectively object <-
update(object, x)
. The update feature without assignement has been disabled.
The option cholupdatesingular
determines how singular matrices
are handled by update
. The function hands back an error
("error"
), a warning ("warning"
) or the value NULL
("null"
).
The Cholesky decompositions requires parameters, linked to memory
allocation. If the default values are too small the Fortran routine
returns an error to R, which allocates more space and calls the Fortran
routine again. The user can also pass better estimates of the allocation
sizes to chol
with the argument memory=list(nnzR=...,
nnzcolindices=...)
. The minimal sizes for a fixed sparsity
structure can be obtained from a summary
call, see ‘Examples’.
The output of chol
can be used with forwardsolve
and
backsolve
to solve a system of linear equations.
Notice that the Cholesky factorization of the package SparseM
is also
based on the algorithm of Ng and Peyton (1993). Whereas the Cholesky
routine of the package Matrix
are based on
CHOLMOD
by Timothy A. Davis (C
code).