Class SimpleSolver
java.lang.Object
solvers.linearSystemSolver.Solver
solvers.linearSystemSolver.SimpleSolver
- All Implemented Interfaces:
SolverInterface
Class which defines a SimpleSolver object, which solves the
system using Gaussian elimination with partial pivoting.
- Author:
- Michail Makaronidis, 2010
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsolve(BigRational[] b) Solves the linear system using Gaussian elimination with partial pivotingMethods inherited from class Solver
getTimer, goToULevel, initialise, initialise, initialise, shutdown
-
Constructor Details
-
SimpleSolver
public SimpleSolver()Constructs a SimpleSolver object.
-
-
Method Details
-
solve
public BigRational[] solve(BigRational[] b) throws OperationNotSupportedException, InconsistentLinearSystemException Solves the linear system using Gaussian elimination with partial pivoting- Specified by:
solvein interfaceSolverInterface- Overrides:
solvein classSolver- Parameters:
b- The vector b of the linear system Ax = b- Returns:
- A vector containing the solutions of the linear system
- Throws:
OperationNotSupportedException- Thrown when the system cannot be solved due to bad vector b sizeInconsistentLinearSystemException- if the operation cannot be completed
-