Package org.ojalgo.matrix.task.iterative
Class MutableSolver<D extends IterativeSolverTask & IterativeSolverTask.SparseDelegate>
- java.lang.Object
-
- org.ojalgo.matrix.task.iterative.IterativeSolverTask
-
- org.ojalgo.matrix.task.iterative.MutableSolver<D>
-
- All Implemented Interfaces:
MatrixTask<java.lang.Double>
,SolverTask<java.lang.Double>
- Direct Known Subclasses:
IterativeASS.SchurComplementSolver
public abstract class MutableSolver<D extends IterativeSolverTask & IterativeSolverTask.SparseDelegate> extends IterativeSolverTask
Maintains a list ofEquation
:s and delegates to aIterativeSolverTask.SparseDelegate
.
-
-
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 D
myDelegate
private java.util.List<Equation>
myRows
private long
mySize
-
Fields inherited from class org.ojalgo.matrix.task.iterative.IterativeSolverTask
DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MutableSolver()
protected
MutableSolver(D delegate, long size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Equation row)
void
clear()
protected double
doubleValue(int row, int col)
protected D
getDelegate()
double[]
getRHS()
boolean
remove(Equation row)
double
resolve(PhysicalStore<java.lang.Double> solution)
A variation of solve(Access2D, Access2D, PhysicalStore) where you do not supply the equation systembody
.double
resolve(PhysicalStore<java.lang.Double> solution, Access1D<?> rhs)
protected void
setAccuracyContext(NumberContext accuracyContext)
protected void
setDebugPrinter(BasicLogger debugPrinter)
protected void
setIterationsLimit(int iterationsLimit)
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.IterativeSolverTask
configurator, debug, getAccuracyContext, getIterationsLimit, isDebugPrinterSet, preallocate, 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.SolverTask
preallocate, solve, toSolutionProvider
-
-
-
-
Field Detail
-
myDelegate
private final D extends IterativeSolverTask & IterativeSolverTask.SparseDelegate myDelegate
-
myRows
private final java.util.List<Equation> myRows
-
mySize
private final long mySize
-
-
Constructor Detail
-
MutableSolver
private MutableSolver()
-
MutableSolver
protected MutableSolver(D delegate, long size)
-
-
Method Detail
-
add
public boolean add(Equation row)
-
clear
public void clear()
-
getRHS
public double[] getRHS()
-
remove
public boolean remove(Equation row)
-
resolve
public final double resolve(PhysicalStore<java.lang.Double> solution)
A variation of solve(Access2D, Access2D, PhysicalStore) where you do not supply the equation systembody
. It is assumed to have been set up beforehand.
-
resolve
public final double resolve(PhysicalStore<java.lang.Double> solution, Access1D<?> rhs)
-
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
.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
-
doubleValue
protected double doubleValue(int row, int col)
-
getDelegate
protected final D getDelegate()
-
setAccuracyContext
protected void setAccuracyContext(NumberContext accuracyContext)
- Overrides:
setAccuracyContext
in classIterativeSolverTask
-
setDebugPrinter
protected void setDebugPrinter(BasicLogger debugPrinter)
- Overrides:
setDebugPrinter
in classIterativeSolverTask
-
setIterationsLimit
protected void setIterationsLimit(int iterationsLimit)
- Overrides:
setIterationsLimit
in classIterativeSolverTask
-
-