Function cholesky_decomp (o2scl_linalg)¶
-
template<class
mat_t
>
into2scl_linalg
::
cholesky_decomp
(const size_t M, mat_t &A, bool err_on_fail = true)¶ Compute the in-place Cholesky decomposition of a symmetric positive-definite square matrix.
On input, the upper triangular part of A is ignored (only the lower triangular part and diagonal are used). On output, the diagonal and lower triangular part contain the matrix L and the upper triangular part contains L^T.
If the matrix is not positive-definite, the error handler will be called, unless
err_on_fail
is false, in which case a non-zero value will be returned.