cholsolveAQinvAT: Solve the equation X = AQ^-1t(A) under permutations

Description Usage Arguments Value References Examples

Description

This function is a wrapper of solve() for finding X = AQ^{-1}t(A) when the permuted Cholesky factor of Q is known. #'

Usage

1
cholsolveAQinvAT(Q = NULL, A = NULL, Lp = NULL, P = NULL)

Arguments

Q

matrix (if of class Matrix needs to be column-compressed, i.e., dgCMatrix or dsCMatrix)), the Cholesky factor of which needs to be found

A

sparse or dense matrix

Lp

the lower Cholesky factor of a permuted Q

P

the permutation matrix

Value

x solution to X = AQ^{-1}t(A)

References

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

Examples

1
2
3
4
5
6
7
8
require(Matrix)
Q = sparseMatrix(i = c(1, 1, 2, 2),
                 j = c(1, 2, 1, 2),
                 x = c(0.1, 0.2, 0.2, 1))
X <- cholPermute(Q)
y <- matrix(c(1,2), 2, 1)
A <- y %*% t(y)
cholsolveAQinvAT(Q,A,X$Qpermchol,X$P)

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