Function cholesky_decomp (o2scl_linalg)

O2scl : Function List

template<>
int o2scl_linalg::cholesky_decomp<Eigen::MatrixXd>(const size_t M, Eigen::MatrixXd &A, bool err_on_fail)

Eigen specialization of cholesky_decomp()

template<class mat_t>
int o2scl_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.