R: Bunch-Kaufman Decomposition Methods

BunchKaufman-methods {Matrix} | R Documentation

## Bunch-Kaufman Decomposition Methods

### Description

The Bunch-Kaufman Decomposition of a square symmetric matrix A is A = P LDL' P' where P is a permutation matrix, L is unit-lower triangular and D is block-diagonal with blocks of dimension 1 x 1 or 2 x 2.

### Usage

    BunchKaufman(x, ...)

### Arguments

`x` | a symmetric square matrix.
`...` | potentially further arguments passed to methods.

### Value

an object of class `BunchKaufman`, which can also be used as a (triangular) matrix directly.

### Methods

Currently, only methods for dense numeric symmetric matrices are implemented.

`x = "dspMatrix"`

  uses Lapack routine `dsptrf`,

`x = "dsyMatrix"`

  uses Lapack routine `dsytrf`, computing the Bunch-Kaufman decomposition.

### References

The original LAPACK source code, including documentation; http://www.netlib.org/lapack/double/dsytrf.f and http://www.netlib.org/lapack/double/dsptrf.f

### See Also

The resulting class, `BunchKaufman`. Related decompositions are the LU, `lu`, and the Cholesky, `chol` (and for sparse matrices, `Cholesky`).

### Examples

    data(CAex)
    dim(CAex)
    isSymmetric(CAex)# TRUE
    CAs <- as(CAex, "symmetricMatrix")
    if(FALSE) # no method defined yet for *sparse* :
       bk. <- BunchKaufman(CAs)
    ## does apply to *dense* symmetric matrices:
    bkCA <- BunchKaufman(as(CAs, "denseMatrix"))
    bkCA

    image(bkCA)# shows how sparse it is, too
    str(R.CA <- as(bkCA, "sparseMatrix"))
    ## an upper triangular 72x72 matrix with only 144 non-zero entries

[Package Matrix version 1.1-4 Index]