Description Usage Arguments Details Value Author(s) References Examples
View source: R/linearAlgebra-positive_definite-test.R
Returns TRUE
if input
is a positive definite matrix,
and FALSE
otherwise.
1 | test_positive_definite(x, tol = 1e-06)
|
x |
Numeric matrix. |
tol |
Numeric. Tolerance. |
A k \times k symmetric matrix \mathbf{A} is positive definite if all of its eigenvalues are positive.
A
is considered to be a positive definite matrix
if NONE of its eigenvalues are less than or equal to
a tolerance value.
Logical.
Ivan Jacob Agaloos Pesigan
1 2 3 4 5 6 7 8 9 10 | # TRUE
test_positive_definite(diag(2))
# FALSE
test_positive_definite(
matrix(
data = c(1, 2, 3, 2, 4, 5, 3, 5, 6),
ncol = 3
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.