public interface SolverTask<N extends Number> extends DecompositionTask<N>
Modifier and Type | Interface and Description |
---|---|
static class |
SolverTask.Factory<N extends Number> |
Modifier and Type | Field and Description |
---|---|
static SolverTask.Factory<BigDecimal> |
BIG |
static SolverTask.Factory<ComplexNumber> |
COMPLEX |
static SolverTask.Factory<Double> |
PRIMITIVE |
Modifier and Type | Method and Description |
---|---|
DecompositionStore<N> |
preallocate(Access2D<N> templateBody,
Access2D<N> templateRHS)
Implementiong this method is optional.
|
MatrixStore<N> |
solve(Access2D<N> body,
Access2D<N> rhs)
[A][X]=[B] or [this][return]=[aRHS]
|
MatrixStore<N> |
solve(Access2D<N> body,
Access2D<N> rhs,
DecompositionStore<N> preallocated)
Implementiong this method is optional.
|
static final SolverTask.Factory<BigDecimal> BIG
static final SolverTask.Factory<ComplexNumber> COMPLEX
static final SolverTask.Factory<Double> PRIMITIVE
DecompositionStore<N> preallocate(Access2D<N> templateBody, Access2D<N> templateRHS)
Implementiong this method is optional.
Will create a DecompositionStore instance suitable for use with#solve(Access2D, DecompositionStore)
. When solving an equation system [A][X]=[B] ([mxn][nxb]=[mxb]) the
preallocated memory/matrix will typically be either mxb or nxb (if A is square then there is no doubt).templateBody
- templateRHS
- UnsupportedOperationException
- When/if this feature is not implementedMatrixStore<N> solve(Access2D<N> body, Access2D<N> rhs) throws TaskException
TaskException
MatrixStore<N> solve(Access2D<N> body, Access2D<N> rhs, DecompositionStore<N> preallocated) throws TaskException
Implementiong this method is optional.
Exactly how 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)
.
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/final/correct solution.UnsupportedOperationException
- When/if this feature is not implementedTaskException