solve method

  1. @override
List<double> solve()
override

Solves the Ax = b equation and returns the x vector containing the solutions of the system.

Implementation

@override
List<double> solve() {
  final lu = equations.luDecomposition();

  // Solving Ly = b
  final L = lu[0].toListOfList();
  final b = knownValues;
  final y = SystemSolver.forwardSubstitution(L, b);

  // Solving Ux = y
  final U = lu[1].toListOfList();
  final x = SystemSolver.backSubstitution(U, y);

  return x;
}