flag to delete the source matrix.
symmetric 'N x N' matrix.
if uplo is Upper, then upper triangle of A is stored, else lower.
import mir.algorithm.iteration: equal, eachUploPair; import mir.ndslice; import mir.random.algorithm; import mir.random.variable; import mir.math.common: approxEqual; auto A = [ 25, double.nan, double.nan, 15, 18, double.nan, -5, 0, 11 ] .sliced(3, 3); auto B = randomSlice(uniformVar(-100, 100), 3, 100); auto C = choleskyDecomp('L', A); auto X = C.solve(B); A.eachUploPair!"a = b"; assert(equal!approxEqual(mtimes(A, X), B));
Computs Cholesky decomposition of symmetric positive definite matrix 'A'. The factorization has the form: \A = U**T * U, if UPLO = 'U', or \A = L * L**T, if UPLO = 'L' Where U is an upper triangular matrix and L is lower triangular.