BunchKaufman-methods function

Methods for Bunch-Kaufman Factorization

Methods for Bunch-Kaufman Factorization

Computes the Bunch-Kaufman factorization of an nbynn-by-n

real, symmetric matrix AA, which has the general form [REMOVE_ME]A=UDUU=LDLLA=UDUU=LDLL[REMOVEME2] A = U D_{U} U' = L D_{L} L'A = U * DU * U' = L * DL * L' [REMOVE_ME_2]

where DUDU and DLDL are symmetric, block diagonal matrices composed of bUbU and bLbL

1by11-by-1 or 2by22-by-2 diagonal blocks; U=prod(PkUk:k=1,...,bU)U = prod(Pk * Uk : k = 1,...,bU)

is the product of bUbU row-permuted unit upper triangular matrices, each having nonzero entries above the diagonal in 1 or 2 columns; and L=prod(PkLk:k=1,...,bL)L = prod(Pk * Lk : k = 1,...,bL)

is the product of bLbL 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 nbynn-by-n

real, symmetric matrix AA, which has the general form

A=UDUU=LDLLA=UDUU=LDLL A = U D_{U} U' = L D_{L} L'A = U * DU * U' = L * DL * L'

where DUDU and DLDL are symmetric, block diagonal matrices composed of bUbU and bLbL

1by11-by-1 or 2by22-by-2 diagonal blocks; U=prod(PkUk:k=1,...,bU)U = prod(Pk * Uk : k = 1,...,bU)

is the product of bUbU row-permuted unit upper triangular matrices, each having nonzero entries above the diagonal in 1 or 2 columns; and L=prod(PkLk:k=1,...,bL)L = prod(Pk * Lk : k = 1,...,bL)

is the product of bLbL 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.

References

The LAPACK source code, including documentation; see https://netlib.org/lapack/double/dsytrf.f and https://netlib.org/lapack/double/dsptrf.f.

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) # dgCMatrix isSymmetric(CAex) # symmetric, but not formally A <- 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 point str(e.bk.A <- expand2(bk.A), max.level = 2L) stopifnot(all.equal(as(A, "matrix"), as(Reduce(`%*%`, e.bk.A), "matrix")))
  • Maintainer: Martin Maechler
  • License: GPL (>= 2) | file LICENCE
  • Last published: 2025-03-11