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 Matrix
aa
private static long
serialVersionUID
-
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 boolean
applicableTo(Matrix matrix)
Checks whether this solver applicable to givenmatrix
or not.private void
backSubstitution(Matrix matrix, Vector result)
Vector
solve(Vector b)
Solves the system A*x = b.private void
triangularizeWithPivoting(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:LinearSystemSolver
Solves the system A*x = b.- Specified by:
solve
in interfaceLinearSystemSolver
- Returns:
-
triangularizeWithPivoting
private void triangularizeWithPivoting(Matrix matrix)
-
applicableTo
public boolean applicableTo(Matrix matrix)
Description copied from interface:LinearSystemSolver
Checks whether this solver applicable to givenmatrix
or not.- Specified by:
applicableTo
in interfaceLinearSystemSolver
-
-