Computes the Bunch-Kaufman factorization of an n−by−n
real, symmetric matrix A, which has the general form [REMOVE_ME]A=UDUU′=LDLL′A=U∗DU∗U′=L∗DL∗L′[REMOVEME2]
where DU and DL are symmetric, block diagonal matrices composed of bU and bL
1−by−1 or 2−by−2 diagonal blocks; U=prod(Pk∗Uk:k=1,...,bU)
is the product of bU row-permuted unit upper triangular matrices, each having nonzero entries above the diagonal in 1 or 2 columns; and L=prod(Pk∗Lk:k=1,...,bL)
is the product of bL row-permuted unit lower triangular matrices, each having nonzero entries below the diagonal in 1 or 2 columns.
Methods are built on LAPACK routines dsytrf and dsptrf.
methods
Description
Computes the Bunch-Kaufman factorization of an n−by−n
real, symmetric matrix A, which has the general form
A=UDUU′=LDLL′A=U∗DU∗U′=L∗DL∗L′
where DU and DL are symmetric, block diagonal matrices composed of bU and bL
1−by−1 or 2−by−2 diagonal blocks; U=prod(Pk∗Uk:k=1,...,bU)
is the product of bU row-permuted unit upper triangular matrices, each having nonzero entries above the diagonal in 1 or 2 columns; and L=prod(Pk∗Lk:k=1,...,bL)
is the product of bL row-permuted unit lower triangular matrices, each having nonzero entries below the diagonal in 1 or 2 columns.
Methods are built on LAPACK routines dsytrf and dsptrf.
BunchKaufman(x,...)## S4 method for signature 'dsyMatrix'BunchKaufman(x, warnSing =TRUE,...)## S4 method for signature 'dspMatrix'BunchKaufman(x, warnSing =TRUE,...)## S4 method for signature 'matrix'BunchKaufman(x, uplo ="U",...)
Arguments
x: a finite symmetric matrix or Matrix to be factorized. If x is square but not symmetric, then it will be treated as symmetric; see uplo.
warnSing: a logical indicating if a warning should be signaled for singular x.
uplo: a string, either "U" or "L", indicating which triangle of x should be used to compute the factorization.
...: further arguments passed to or from methods.
Returns
An object representing the factorization, inheriting from virtual class BunchKaufmanFactorization. The specific class is BunchKaufman unless x inherits from virtual class packedMatrix, in which case it is pBunchKaufman.
See Also
Classes BunchKaufman and pBunchKaufman and their methods.
Classes dsyMatrix and dspMatrix.
Generic functions expand1 and expand2, for constructing matrix factors from the result.
Generic functions Cholesky, Schur, lu, and qr, for computing other factorizations.
Golub, G. H., & Van Loan, C. F. (2013). Matrix computations (4th ed.). Johns Hopkins University Press. tools:::Rd_expr_doi("10.56021/9781421407944")
Examples
showMethods("BunchKaufman", inherited =FALSE)set.seed(0)data(CAex, package ="Matrix")class(CAex)# dgCMatrixisSymmetric(CAex)# symmetric, but not formallyA <- as(CAex,"symmetricMatrix")class(A)# dsCMatrix## Have methods for denseMatrix (unpacked and packed),## but not yet sparseMatrix ...## Not run:(bk.A <- BunchKaufman(A))## End(Not run)(bk.A <- BunchKaufman(as(A,"unpackedMatrix")))## A ~ U DU U' in floating pointstr(e.bk.A <- expand2(bk.A), max.level =2L)stopifnot(all.equal(as(A,"matrix"), as(Reduce(`%*%`, e.bk.A),"matrix")))