cholesky_decomposition

Function cholesky_decomposition 

Source
pub fn cholesky_decomposition<T: Numeric + Sqrt<Output = T>>(
    matrix: &Matrix<T>,
) -> Option<Matrix<T>>
where for<'a> &'a T: NumericRef<T>,
Expand description

Computes the cholesky decomposition of a matrix. This yields a matrix L such that for the provided matrix A, L * L^T = A. L will always be lower triangular, ie all entries above the diagonal will be 0. Hence cholesky decomposition can be interpreted as a generalised square root function.

Cholesky decomposition is defined for symmetric, positive definite matrices.

This function does not check that the provided matrix is symmetric. However, given a symmetric input, if the input is not positive definite None is returned. Attempting a cholseky decomposition is also an efficient way to check if such a matrix is positive definite. In the future additional checks that the input is valid could be added.