[−][src]Function easy_ml::linear_algebra::cholesky_decomposition
pub fn cholesky_decomposition<T: Numeric + Sqrt<Output = T>>(
matrix: &Matrix<T>
) -> Option<Matrix<T>> where
&'a T: NumericRef<T>,
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 Hermitian, positive definite matrices. For a real valued (ie not containing complex numbers) matrix, if it is Symmetric it is Hermitian.
This function does not check that the provided matrix is Hermitian or
positive definite at present, but may in the future, in which case None
will be returned.