Module ojalgo
Package org.ojalgo.matrix.task
Interface SolverTask<N extends java.lang.Comparable<N>>
-
- All Superinterfaces:
MatrixTask<N>
- All Known Subinterfaces:
Cholesky<N>,Eigenvalue.Spectral<N>,LDL<N>,LDU<N>,LU<N>,MatrixDecomposition.Solver<N>,QR<N>,SingularValue<N>
- All Known Implementing Classes:
AbstractSolver,ConjugateGradientSolver,DenseCholesky,DenseCholesky.C128,DenseCholesky.H256,DenseCholesky.Q128,DenseCholesky.R064,DenseCholesky.R128,DenseLDL,DenseLDL.C128,DenseLDL.H256,DenseLDL.Q128,DenseLDL.R064,DenseLDL.R128,DenseLU,DenseLU.C128,DenseLU.H256,DenseLU.Q128,DenseLU.R064,DenseLU.R128,DenseQR,DenseQR.C128,DenseQR.H256,DenseQR.Q128,DenseQR.R064,DenseQR.R128,DenseSingularValue,DenseSingularValue.C128,DenseSingularValue.H256,DenseSingularValue.Q128,DenseSingularValue.R064,DenseSingularValue.R128,GaussSeidelSolver,HermitianEvD,HermitianEvD.C128,HermitianEvD.H256,HermitianEvD.Q128,HermitianEvD.R064,HermitianEvD.R128,IterativeASS.SchurComplementSolver,IterativeSolverTask,JacobiSolver,MINRESSolver,MutableSolver,ParallelGaussSeidelSolver,QMRSolver,RawCholesky,RawEigenvalue.Symmetric,RawLU,RawQR,RawSingularValue,SparseLU
public interface SolverTask<N extends java.lang.Comparable<N>> extends MatrixTask<N>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSolverTask.Factory<N extends java.lang.Comparable<N>>
-
Field Summary
Fields Modifier and Type Field Description static SolverTask.Factory<ComplexNumber>C128static SolverTask.Factory<Quaternion>H256static SolverTask.Factory<RationalNumber>Q128static SolverTask.Factory<java.lang.Double>R064static SolverTask.Factory<Quadruple>R128
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PhysicalStore<N>preallocate(int nbEquations, int nbVariables, int nbSolutions)default PhysicalStore<N>preallocate(Structure2D templateBody, Structure2D templateRHS)Will create a PhysicalStore instance suitable for use withsolve(Access2D, Access2D, PhysicalStore).default MatrixStore<N>solve(Access2D<?> body, Access2D<?> rhs)[A][X]=[B] or [body][return]=[rhs]MatrixStore<N>solve(Access2D<?> body, Access2D<?> rhs, PhysicalStore<N> preallocated)Exactly how (if at all) a specific implementation makes use ofpreallocatedis not specified by this interface.default Provider2D.Solution<java.util.Optional<MatrixStore<N>>>toSolutionProvider(ElementsSupplier<N> body, java.util.function.Supplier<MatrixStore<N>> alternativeBodySupplier, Access2D<?> rhs)
-
-
-
Field Detail
-
C128
static final SolverTask.Factory<ComplexNumber> C128
-
H256
static final SolverTask.Factory<Quaternion> H256
-
Q128
static final SolverTask.Factory<RationalNumber> Q128
-
R064
static final SolverTask.Factory<java.lang.Double> R064
-
R128
static final SolverTask.Factory<Quadruple> R128
-
-
Method Detail
-
preallocate
PhysicalStore<N> preallocate(int nbEquations, int nbVariables, int nbSolutions)
-
preallocate
default PhysicalStore<N> preallocate(Structure2D templateBody, Structure2D templateRHS)
Will create a PhysicalStore instance suitable for use with
solve(Access2D, Access2D, PhysicalStore). The dimensions of the returned instance is not specified by this interface - it is specified by the behaviour/requirements of each implementation.When solving an equation system [A][X]=[B] ([mxn][nxb]=[mxb]) the preallocated memory/matrix will typically be either mxb or nxb.
-
solve
default MatrixStore<N> solve(Access2D<?> body, Access2D<?> rhs) throws RecoverableCondition
[A][X]=[B] or [body][return]=[rhs]- Throws:
RecoverableCondition
-
solve
MatrixStore<N> solve(Access2D<?> body, Access2D<?> rhs, PhysicalStore<N> preallocated) throws RecoverableCondition
Exactly how (if at all) a specific implementation makes use of
preallocatedis not specified by this interface. It must be documented for each implementation.Should produce the same results as calling
solve(Access2D, Access2D).Use
preallocate(Structure2D, Structure2D)to obtain a suitbalepreallocated.- Parameters:
rhs- The Right Hand Side, wont be modfiedpreallocated- 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
-
toSolutionProvider
default Provider2D.Solution<java.util.Optional<MatrixStore<N>>> toSolutionProvider(ElementsSupplier<N> body, java.util.function.Supplier<MatrixStore<N>> alternativeBodySupplier, Access2D<?> rhs)
-
-