Description Usage Arguments Details Value References Examples
Estimate the reciprocal of the condition number of a matrix using the MAGMA library for GPU or PLASMA library for multi-core CPUs.
1 2 3 4 |
x |
an R object that inherits from the |
norm |
Character indicating the type of norm to be used in the estimate.
The default is |
... |
further arguments passed to or from other methods. |
Uses the LU decomposition using magma_dgetrf
or
PLASMA_dgetrf
with the respective MAGMA or PLASMA norms if
available (see norm documentation for more info).It also calls LAPACK dgecon
as this is not supported in MAGMA/PLASMA. For further details on classes and methods
see the Matrix package documentation.
An estimate of the reciprocal condition number of x
.
Martin Maechler, Douglas Bates (Matrix package)
1 2 3 4 5 6 7 8 9 | x <- Matrix(rnorm(9), 3, 3)
rcond(x)
## typically "the same" (with more computational effort):
1 / (norm(x) * norm(solve(x)))
rcond(Hilbert(9)) # should be about 9.1e-13
## For non-square matrices:
rcond(x1 <- cbind(1,1:10))# 0.05278
rcond(x2 <- cbind(x1, 2:11))# practically 0, since x2 does not have full rank
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.