Package org.ojalgo.matrix.task.iterative
Class ParallelGaussSeidelSolver
- java.lang.Object
-
- org.ojalgo.matrix.task.iterative.IterativeSolverTask
-
- org.ojalgo.matrix.task.iterative.StationaryIterativeSolver
-
- org.ojalgo.matrix.task.iterative.ParallelGaussSeidelSolver
-
- All Implemented Interfaces:
IterativeSolverTask.SparseDelegate
,MatrixTask<java.lang.Double>
,SolverTask<java.lang.Double>
public final class ParallelGaussSeidelSolver extends StationaryIterativeSolver implements IterativeSolverTask.SparseDelegate
Experimental parallelised version ofGaussSeidelSolver
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ojalgo.matrix.task.iterative.IterativeSolverTask
IterativeSolverTask.Configurator, IterativeSolverTask.SparseDelegate
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.task.SolverTask
SolverTask.Factory<N extends java.lang.Comparable<N>>
-
-
Field Summary
Fields Modifier and Type Field Description private static DivideAndConquer.Divider
DIVIDER
private static java.util.function.IntSupplier
PARALLELISM
private static int
THRESHOLD
-
Fields inherited from class org.ojalgo.matrix.task.iterative.IterativeSolverTask
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description ParallelGaussSeidelSolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
divide(int nbEquations, DivideAndConquer.Conquerer conquerer)
double
resolve(java.util.List<Equation> equations, PhysicalStore<java.lang.Double> solution)
private double
resolve(java.util.List<Equation> equations, PhysicalStore<java.lang.Double> solution, double normRHS, java.util.concurrent.atomic.AtomicInteger iterationsCounter, int first, int last)
MatrixStore<java.lang.Double>
solve(Access2D<?> body, Access2D<?> rhs, PhysicalStore<java.lang.Double> current)
Exactly how (if at all) a specific implementation makes use ofpreallocated
is not specified by this interface.-
Methods inherited from class org.ojalgo.matrix.task.iterative.StationaryIterativeSolver
getRelaxationFactor, setRelaxationFactor
-
Methods inherited from class org.ojalgo.matrix.task.iterative.IterativeSolverTask
configurator, debug, getAccuracyContext, getIterationsLimit, isDebugPrinterSet, preallocate, setAccuracyContext, setDebugPrinter, setIterationsLimit, solve, toListOfRows
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.matrix.task.iterative.IterativeSolverTask.SparseDelegate
resolve
-
Methods inherited from interface org.ojalgo.matrix.task.SolverTask
preallocate, solve, toSolutionProvider
-
-
-
-
Field Detail
-
DIVIDER
private static final DivideAndConquer.Divider DIVIDER
-
PARALLELISM
private static final java.util.function.IntSupplier PARALLELISM
-
THRESHOLD
private static final int THRESHOLD
- See Also:
- Constant Field Values
-
-
Method Detail
-
divide
private static void divide(int nbEquations, DivideAndConquer.Conquerer conquerer)
-
resolve
public double resolve(java.util.List<Equation> equations, PhysicalStore<java.lang.Double> solution)
- Specified by:
resolve
in interfaceIterativeSolverTask.SparseDelegate
-
solve
public MatrixStore<java.lang.Double> solve(Access2D<?> body, Access2D<?> rhs, PhysicalStore<java.lang.Double> current) throws RecoverableCondition
Description copied from interface:SolverTask
Exactly how (if at all) a specific implementation makes use of
preallocated
is not specified by this interface. It must be documented for each implementation.Should produce the same results as calling
SolverTask.solve(Access2D, Access2D)
.Use
SolverTask.preallocate(Structure2D, Structure2D)
to obtain a suitbalepreallocated
.- Specified by:
solve
in interfaceSolverTask<java.lang.Double>
rhs
- The Right Hand Side, wont be modfiedcurrent
- Preallocated memory for the results, possibly some intermediate results. You must assume this is modified, but you cannot assume it will contain the full/ /correct solution.- Returns:
- The solution
- Throws:
RecoverableCondition
-
resolve
private double resolve(java.util.List<Equation> equations, PhysicalStore<java.lang.Double> solution, double normRHS, java.util.concurrent.atomic.AtomicInteger iterationsCounter, int first, int last)
-
-