Class LUSolver
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.linearsystem.LUSolver
-
public class LUSolver extends Object
Use LU decomposition to solve Ax = b where A is square and det(A) != 0. The dimensions of A and b must match. The algorithm goes as follows.
We first solve Ly = b by forward substitution and then Ux = y by backward substitution.Ax = b; LUx = PAx = Pb
- See Also:
- Wikipedia: Solving linear equations
-
-
Constructor Summary
Constructors Constructor Description LUSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
solve(LSProblem problem)
Solve Ax = b.Matrix
solve(Matrix A, Matrix B)
Solves AX = B.
-
-
-
Method Detail
-
solve
public Vector solve(LSProblem problem)
Solve Ax = b.- Parameters:
problem
- a system of linear equations- Returns:
- x a solution such that Ax = b
- Throws:
LinearSystemSolver.NoSolution
- if there is no solution to the system
-
-