Package org.ojalgo.matrix.task
Interface SolverTask<N extends 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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SolverTask.Factory
<ComplexNumber> static final SolverTask.Factory
<Quaternion> static final SolverTask.Factory
<RationalNumber> static final SolverTask.Factory
<Double> static final SolverTask.Factory
<Quadruple> -
Method Summary
Modifier and TypeMethodDescriptiondefault PhysicalStore
<N> preallocate
(int numberOfEquations, int numberOfVariables, int numberOfSolutions) preallocate
(Structure2D templateBody, Structure2D templateRHS) Will create a PhysicalStore instance suitable for use withsolve(Access2D, Access2D, PhysicalStore)
.default MatrixStore
<N> [A][X]=[B] or [body][return]=[rhs]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
<Optional<MatrixStore<N>>> toSolutionProvider
(ElementsSupplier<N> body, Supplier<MatrixStore<N>> alternativeBodySupplier, Access2D<?> rhs)
-
Field Details
-
C128
-
H256
-
Q128
-
R064
-
R128
-
-
Method Details
-
preallocate
default PhysicalStore<N> preallocate(int numberOfEquations, int numberOfVariables, int numberOfSolutions) -
preallocate
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
[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<Optional<MatrixStore<N>>> toSolutionProvider(ElementsSupplier<N> body, Supplier<MatrixStore<N>> alternativeBodySupplier, Access2D<?> rhs)
-