pub fn ldlt_decomposition_tensor<T, S, I>(
tensor: I,
) -> Option<LDLTDecompositionTensor<T>>Expand description
Computes the LDL^T decomposition of a matrix. This yields a matrix L and a matrix D
such that for the provided matrix A, L * D * L^T = A. L will always be
unit lower triangular, ie all entries above the diagonal will be 0, and all entries along
the diagonal will br 1. D will always contain zeros except along the diagonal. This
decomposition is closely related to the cholesky decomposition
with the notable difference that it avoids taking square roots.
Similarly to the cholseky decomposition, the input matrix must be symmetric and positive definite.
This function does not check that the provided matrix is symmetric. However, given a symmetric
input, if the input is only positive semidefinite None is returned. In the future
additional checks that the input is valid could be added.
The shapes of the L and D matrices will be the same as the input matrix.
ยงWarning
With some uses of this function the Rust compiler gets confused about what type T
should be and you will get the error:
overflow evaluating the requirement
&'a _: easy_ml::numeric::NumericByValue<_, _>
In this case you need to manually specify the type of T by using the
turbofish syntax like:
linear_algebra::ldlt_decomposition_tensor::<f32, _, _>(&tensor)