chol: Cholesky Decomposition using GPU or multi-core CPU

Description Usage Arguments Details Methods References Examples

Description

Compute the Cholesky factorization of a real symmetric positive-definite square matrix using GPU or multi-core CPU.

Usage

1
2
3
chol(x, ...)
## S4 method for signature 'dpoMatrix'
chol(x, pivot = FALSE, ...)

Arguments

x

if x is not positive definite, an error is signalled.

pivot

logical indicating if pivoting is used. This is not supported for the GPU implementation

...

potentially further arguments passed to methods.

Details

For further details on classes and methods see the full Matrix package documentation.

Methods

chol

signature(x = "dgeMatrix"): works via "dpoMatrix"

chol

signature(x = "dpoMatrix"): Returns (and stores) the Cholesky decomposition of x, via LAPACK routines dlacpy and either magma_dpotrf or PLASMA_dpotrf.

References

Martin Maechler, Douglas Bates (Matrix package)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
showMethods(chol, inherited = FALSE) # show different methods

sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77))
(c2 <- chol(sy2))#-> "Cholesky" matrix
stopifnot(all.equal(c2, chol(as(sy2, "dpoMatrix")), tol= 1e-13))
str(c2)

## An example where chol() can't work
(sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7)))
try(chol(sy3)) # error, since it is not positive definite

HiPLARM documentation built on May 29, 2017, 10:42 p.m.

Related to chol in HiPLARM...