flag to delete the source matrix.
the triangular factor 'U' or 'L' from the Cholesky factorization
the right hand side matrix.
'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
The solution matrix X.
auto A = [ 25, 15, -5, 15, 18, 0, -5, 0, 11 ] .sliced(3, 3) .as!double.slice; import mir.random.variable; import mir.random.algorithm; auto B = randomSlice!double(uniformVar(-100, 100), 3, 100); auto C = A.choleskyDecomp('L'); auto X = C.solve(B); import std.math: approxEqual; import mir.ndslice.algorithm: equal; assert(equal!approxEqual(mtimes(A, X), B));
Solves a system of linear equations A * X = B with a symmetric matrix A using the Cholesky factorization: \A = U**T * U or \A = L * L**T computed by choleskyDecomp.