cholesky_decomposition_tensor

Function cholesky_decomposition_tensor 

Source
pub fn cholesky_decomposition_tensor<T, S, I>(tensor: I) -> Option<Tensor<T, 2>>
where T: Numeric + Sqrt<Output = T>, for<'a> &'a T: NumericRef<T>, I: Into<TensorView<T, S, 2>>, S: TensorRef<T, 2>,
Expand description

Computes the cholesky decomposition of a Tensor 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.

The output matrix will have the same shape as the input.