Interface SolverInterface
- All Known Implementing Classes:
ModularSolver, ParallelSolver, SimpleSolver, Solver
public interface SolverInterface
Interface for classes which define several methods every LinearSystemSolver
object must support.
- Author:
- Michail Makaronidis, 2010
-
Method Summary
Modifier and TypeMethodDescriptiongetTimer()Returns the Timer object corresponding to this particular Solver.voidgoToULevel(int level) Sets matrices A and cleanA equal to the original A used during initialisation plus "level" increments in the positions needed.voidinitialise(BigRational[][] A) Initialises the solver object.voidinitialise(BigRational[][] A, List<Tuple<Integer, Integer>> UList, Set<Integer> uncomputables) Initialises the solver object, taking into account a list of positions of A that may need to be updated when requested.solve(BigRational[] b) Gaussian elimination linear system solver with partial pivoting.
-
Method Details
-
initialise
Initialises the solver object.- Parameters:
A- The matrix A of the linear system Ax = b- Throws:
OperationNotSupportedException- Thrown when the matrix A is not square
-
initialise
void initialise(BigRational[][] A, List<Tuple<Integer, Integer>> UList, Set<Integer> uncomputables) throws OperationNotSupportedExceptionInitialises the solver object, taking into account a list of positions of A that may need to be updated when requested. This is needed by the MoM algorithm.- Parameters:
A- The matrix A of the linear system Ax = bUList- The list containing these positions as Tuple objectsuncomputables- Set of the indices of possible zero-columns of A- Throws:
OperationNotSupportedException- Thrown when the matrix A is not square
-
goToULevel
void goToULevel(int level) Sets matrices A and cleanA equal to the original A used during initialisation plus "level" increments in the positions needed. See how the MoM algorithm updates A during the iterations.- Parameters:
level- The number of applications with regard to the original A
-
solve
BigRational[] solve(BigRational[] b) throws OperationNotSupportedException, InconsistentLinearSystemException, InternalErrorException Gaussian elimination linear system solver with partial pivoting.- 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- Thrown when the system cannot failed due to singularity.InternalErrorException- Thrown when an unrecoverable internal error has been detected by the solver.
-
getTimer
Timer getTimer()Returns the Timer object corresponding to this particular Solver.- Returns:
- The Timer object
-