LDU function
Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix @param {ReadonlyMat2} L the lower triangular matrix @param {ReadonlyMat2} D the diagonal matrix @param {ReadonlyMat2} U the upper triangular matrix @param {ReadonlyMat2} a the input matrix to factorize
Implementation
// ignore: non_constant_identifier_names
List<List<double>> LDU(List<double> L, List<double> D, List<double> U, List<double> a) {
L[2] = a[2] / a[0];
U[0] = a[0];
U[1] = a[1];
U[3] = a[3] - L[2] * U[1];
return [L, D, U];
}