cholPermute: Sparse Cholesky factorisation with fill-in reducing...

Description Usage Arguments Value References Examples

Description

This function is similar to chol(A, pivot=T) when A is a sparse matrix. The fill-in reduction permutation is the approximate minimum degree permutation of Davis' SuiteSparse package configured to be slightly more aggressive than that in the Matrix package.

Usage

1

Arguments

Q

precision matrix of class matrix, Matrix (column-compressed, i.e., dgCMatrix or dsCMatrix), or spam

Value

A list with two elements, Qpermchol (the permuted Cholesky factor) and P (the permutation matrix) of class Matrix. Note that spam matrices are not returned to comply with the Takahashi_Davis function which requires objects of class Matrix.

References

Havard Rue and Leonhard Held (2005). Gaussian Markov Random Fields: Theory and Applications. Chapman & Hall/CRC Press

Examples

1
2
3
4
require(Matrix)
cholPermute(sparseMatrix(i = c(1,1,2,2),
                         j = c(1, 2, 1, 2),
                         x = c(0.1, 0.2, 0.2, 1)))

Example output

Loading required package: Matrix
$Qpermchol
2 x 2 sparse Matrix of class "dtCMatrix"
                        
[1,] 0.3162278 .        
[2,] 0.6324555 0.7745967

$P
2 x 2 sparse Matrix of class "dgCMatrix"
        
[1,] 1 .
[2,] . 1

sparseinv documentation built on May 2, 2019, 7:04 a.m.