Package org.ojalgo.matrix.task
Interface SolverTask<N extends java.lang.Comparable<N>>
-
- All Superinterfaces:
MatrixTask<N>
- All Known Subinterfaces:
Cholesky<N>
,LDL<N>
,LDU<N>
,LU<N>
,MatrixDecomposition.Solver<N>
,QR<N>
,SingularValue<N>
- All Known Implementing Classes:
AbstractSolver
,CholeskyDecomposition
,CholeskyDecomposition.C128
,CholeskyDecomposition.H256
,CholeskyDecomposition.Q128
,CholeskyDecomposition.R064
,CholeskyDecomposition.R128
,ConjugateGradientSolver
,GaussSeidelSolver
,HermitianEvD
,HermitianEvD.C128
,HermitianEvD.H256
,HermitianEvD.Q128
,HermitianEvD.R064
,HermitianEvD.R128
,IterativeASS.SchurComplementSolver
,IterativeSolverTask
,JacobiSolver
,KrylovSubspaceSolver
,LDLDecomposition
,LDLDecomposition.C128
,LDLDecomposition.H256
,LDLDecomposition.Q128
,LDLDecomposition.R064
,LDLDecomposition.R128
,LUDecomposition
,LUDecomposition.C128
,LUDecomposition.H256
,LUDecomposition.Q128
,LUDecomposition.R064
,LUDecomposition.R128
,MutableSolver
,ParallelGaussSeidelSolver
,QRDecomposition
,QRDecomposition.C128
,QRDecomposition.H256
,QRDecomposition.Q128
,QRDecomposition.R064
,QRDecomposition.R128
,RawCholesky
,RawEigenvalue.Symmetric
,RawLU
,RawQR
,RawSingularValue
,SingularValueDecomposition
,SingularValueDecomposition.C128
,SingularValueDecomposition.H256
,SingularValueDecomposition.Q128
,SingularValueDecomposition.R064
,SingularValueDecomposition.R128
,StationaryIterativeSolver
public interface SolverTask<N extends java.lang.Comparable<N>> extends MatrixTask<N>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SolverTask.Factory<N extends java.lang.Comparable<N>>
-
Field Summary
Fields Modifier and Type Field Description static SolverTask.Factory<ComplexNumber>
C128
static SolverTask.Factory<Quaternion>
H256
static SolverTask.Factory<RationalNumber>
Q128
static SolverTask.Factory<java.lang.Double>
R064
static SolverTask.Factory<Quadruple>
R128
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PhysicalStore<N>
preallocate(int numberOfEquations, int numberOfVariables, int numberOfSolutions)
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 ofpreallocated
is 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
default PhysicalStore<N> preallocate(int numberOfEquations, int numberOfVariables, int numberOfSolutions)
-
preallocate
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
preallocated
is 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)
-
-