Package org.la4j.linear
Class GaussianSolver
- java.lang.Object
-
- org.la4j.linear.AbstractSolver
-
- org.la4j.linear.GaussianSolver
-
- All Implemented Interfaces:
java.io.Serializable,LinearSystemSolver
public class GaussianSolver extends AbstractSolver implements LinearSystemSolver
This class represents Gaussian method for solving linear systems. More details- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Matrixaaprivate static longserialVersionUID-
Fields inherited from class org.la4j.linear.AbstractSolver
a, equations, unknowns
-
-
Constructor Summary
Constructors Constructor Description GaussianSolver(Matrix a)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplicableTo(Matrix matrix)Checks whether this solver applicable to givenmatrixor not.private voidbackSubstitution(Matrix matrix, Vector result)Vectorsolve(Vector b)Solves the system A*x = b.private voidtriangularizeWithPivoting(Matrix matrix)-
Methods inherited from class org.la4j.linear.AbstractSolver
ensureRHSIsCorrect, equations, fail, self, unknowns
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.la4j.linear.LinearSystemSolver
equations, self, unknowns
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
aa
private final Matrix aa
-
-
Constructor Detail
-
GaussianSolver
public GaussianSolver(Matrix a)
-
-
Method Detail
-
solve
public Vector solve(Vector b)
Description copied from interface:LinearSystemSolverSolves the system A*x = b.- Specified by:
solvein interfaceLinearSystemSolver- Returns:
-
triangularizeWithPivoting
private void triangularizeWithPivoting(Matrix matrix)
-
applicableTo
public boolean applicableTo(Matrix matrix)
Description copied from interface:LinearSystemSolverChecks whether this solver applicable to givenmatrixor not.- Specified by:
applicableToin interfaceLinearSystemSolver
-
-