Class ModularSolverParallelTask
java.lang.Object
solvers.linearSystemSolver.ModularSolverParallelTask
The ModularSolverParallelTask performs the solution of a residual linear system
and part of the result recombination process. It is used to acieve
parallelisation of the ModularSolver.
- Author:
- Michail Makaronidis, 2010
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a ModularSolverParallelTask for solving a residual linear system. -
Method Summary
Modifier and TypeMethodDescriptioncall()This method implements the call() method of the Callable object by invoking the run() method.Returns the value of the residual determinant.getyRes()The array of the semi-combined residual solutions.voidprepare(BigRational[][] Amod, BigRational[] b, Set<Integer> rowsToSkip, Set<Integer> columnsToSkip) Initialises a ModularSolverParallelTask object for solving a residual linear system Ax=b.voidrun()Solves the residual system using Extended Gaussian Elimination.
-
Constructor Details
-
ModularSolverParallelTask
Creates a ModularSolverParallelTask for solving a residual linear system.- Parameters:
mod- The prime modulo corresponding to this systemM- The product of all prime moduli
-
-
Method Details
-
prepare
public void prepare(BigRational[][] Amod, BigRational[] b, Set<Integer> rowsToSkip, Set<Integer> columnsToSkip) throws InconsistentLinearSystemException Initialises a ModularSolverParallelTask object for solving a residual linear system Ax=b.- Parameters:
Amod- The pre-computed residual matrix Ab- The (initial, non-residual) vector browsToSkip- The rows of the initial matrix A and the vector b that must be skippedcolumnsToSkip- The columns of the initial matrix A and the vector b that must be skipped- Throws:
InconsistentLinearSystemException- if the operation cannot be completed
-
run
Solves the residual system using Extended Gaussian Elimination.- Throws:
InternalErrorException- Thrown when an unrecoverable internal error is made.InconsistentLinearSystemException- Thrown when the solution cannot proceed due to linear system singularities.
-
getDetRes
Returns the value of the residual determinant.- Returns:
- The value of the residual determinant as a BigRational
-
getyRes
The array of the semi-combined residual solutions.- Returns:
- An array of BigRational object containing such solutions
-
call
-