chol2symm.Rd
Evaluate t(x) \%*\% x
efficiently, where x
is the
(upper-triangular) Cholesky factor of a symmetric, positive definite square
matrix. I.e. it is the inverse of chol
.
chol2symm(x)
x | a square, upper triangular matrix representing the Cholesky factor of a symmetric, positive definite square matrix |
---|
# a symmetric, positive definite square matrix y <- rWishart(1, 4, diag(3))[, , 1] u <- chol(y) identical(y, chol2symm(u))#> [1] TRUE#> [1] TRUE# NOT RUN { u_greta <- cholesky_variable(3) y_greta <- chol2symm(u) # }