Description Usage Arguments Details Methods References Examples
Compute the Cholesky factorization of a real symmetric positive-definite square matrix using GPU or multi-core CPU.
1 2 3 |
x |
if |
pivot |
logical indicating if pivoting is used. This is not supported for the GPU implementation |
... |
potentially further arguments passed to methods. |
For further details on classes and methods see the full Matrix package documentation.
signature(x = "dgeMatrix")
: works via
"dpoMatrix"
signature(x = "dpoMatrix")
:
Returns (and stores) the Cholesky decomposition of x
, via
LAPACK routines dlacpy
and either magma_dpotrf
or PLASMA_dpotrf
.
Martin Maechler, Douglas Bates (Matrix package)
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.