Classes Cholesky and pCholesky represent dense, pivoted Cholesky factorizations of n−by−n
real, symmetric, positive semidefinite matrices A, having the general form [REMOVE_ME]P1AP1′=L1DL1′=LL′P1∗A∗P1′=L1∗D∗L1′=L∗L′[REMOVEME2]
or (equivalently) [REMOVE_ME]A=P1′L1DL1′P1=P1′LL′P1A=P1′∗L1∗D∗L1′∗P1=P1′∗L∗L′∗P1[REMOVEME2]
where P1 is a permutation matrix, L1 is a unit lower triangular matrix, D is a non-negative diagonal matrix, and L=L1∗sqrt(D).
These classes store the entries of the Cholesky factor L or its transpose L′ in a dense format as a vector of length n∗n (Cholesky) or n∗(n+1)/2 (pCholesky), the latter giving the packed representation.
class
Description
Classes Cholesky and pCholesky represent dense, pivoted Cholesky factorizations of n−by−n
real, symmetric, positive semidefinite matrices A, having the general form
where P1 is a permutation matrix, L1 is a unit lower triangular matrix, D is a non-negative diagonal matrix, and L=L1∗sqrt(D).
These classes store the entries of the Cholesky factor L or its transpose L′ in a dense format as a vector of length n∗n (Cholesky) or n∗(n+1)/2 (pCholesky), the latter giving the packed representation.
Slots
Dim, Dimnames: inherited from virtual class MatrixFactorization.
uplo: a string, either "U" or "L", indicating which triangle (upper or lower) of the factorized symmetric matrix was used to compute the factorization and in turn whether x stores L′ or L.
x: a numeric vector of length n*n
(`Cholesky`) or `n*(n+1)/2` (`pCholesky`), where `n=Dim[1]`, listing the entries of the Cholesky factor $L$ or its transpose $L'$ in column-major order.
perm: a 1-based integer vector of length Dim[1]
specifying the permutation applied to the rows and columns of the factorized matrix. `perm` of length 0 is valid and equivalent to the identity permutation, implying no pivoting.
Extends
Class CholeskyFactorization, directly. Class MatrixFactorization, by class CholeskyFactorization, distance 2.
Instantiation
Objects can be generated directly by calls of the form new("Cholesky", ...) or new("pCholesky", ...), but they are more typically obtained as the value of Cholesky(x) for x inheriting from dsyMatrix or dspMatrix
(often the subclasses of those reserved for positive semidefinite matrices, namely dpoMatrix
and dppMatrix).
Methods
coerce: signature(from = "Cholesky", to = "dtrMatrix"): returns a dtrMatrix representing the Cholesky factor L or its transpose L′; see Note .
coerce: signature(from = "pCholesky", to = "dtpMatrix"): returns a dtpMatrix representing the Cholesky factor L or its transpose L′; see Note .
determinant: signature(from = "p?Cholesky", logarithm = "logical"): computes the determinant of the factorized matrix A
or its logarithm.
diag: signature(x = "p?Cholesky"): returns a numeric vector of length n containing the diagonal elements of D, which are the squared diagonal elements of L.
expand1: signature(x = "p?Cholesky"): see expand1-methods.
expand2: signature(x = "p?Cholesky"): see expand2-methods.
solve: signature(a = "p?Cholesky", b = .): see solve-methods.
Note
In Matrix< 1.6-0, class Cholesky extended dtrMatrix and class pCholesky extended dtpMatrix, reflecting the fact that the factor L is indeed a triangular matrix. Matrix1.6-0 removed these extensions so that methods would no longer be inherited from dtrMatrix and dtpMatrix. The availability of such methods gave the wrong impression that Cholesky and pCholesky represent a (singular) matrix, when in fact they represent an ordered set of matrix factors.
The coercions as(., "dtrMatrix") and as(., "dtpMatrix")
are provided for users who understand the caveats.
See Also
Class CHMfactor for sparse Cholesky factorizations.