Class ModularSolverParallelTask

java.lang.Object
solvers.linearSystemSolver.ModularSolverParallelTask
All Implemented Interfaces:
Callable<Object>

public class ModularSolverParallelTask extends Object implements Callable<Object>
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 Details

    • ModularSolverParallelTask

      public ModularSolverParallelTask(BigInteger mod, BigInteger M)
      Creates a ModularSolverParallelTask for solving a residual linear system.
      Parameters:
      mod - The prime modulo corresponding to this system
      M - 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 A
      b - The (initial, non-residual) vector b
      rowsToSkip - The rows of the initial matrix A and the vector b that must be skipped
      columnsToSkip - 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

      public BigRational getDetRes()
      Returns the value of the residual determinant.
      Returns:
      The value of the residual determinant as a BigRational
    • getyRes

      public BigRational[] getyRes()
      The array of the semi-combined residual solutions.
      Returns:
      An array of BigRational object containing such solutions
    • call

      public Object call() throws Exception
      This method implements the call() method of the Callable object by invoking the run() method.
      Specified by:
      call in interface Callable<Object>
      Returns:
      An always null object
      Throws:
      Exception - When any errors are encountered during the run() method.