public interface InverterTask<N extends Number> extends DecompositionTask<N>
Modifier and Type | Interface and Description |
---|---|
static class |
InverterTask.Factory<N extends Number> |
Modifier and Type | Field and Description |
---|---|
static InverterTask.Factory<BigDecimal> |
BIG |
static InverterTask.Factory<ComplexNumber> |
COMPLEX |
static InverterTask.Factory<Double> |
PRIMITIVE |
Modifier and Type | Method and Description |
---|---|
MatrixStore<N> |
invert(MatrixStore<N> original)
The output must be a "right inverse" and a "generalised inverse".
|
MatrixStore<N> |
invert(MatrixStore<N> original,
DecompositionStore<N> preallocated)
Implementiong this method is optional.
|
DecompositionStore<N> |
preallocate(Access2D<N> template)
Implementiong this method is optional.
|
static final InverterTask.Factory<BigDecimal> BIG
static final InverterTask.Factory<ComplexNumber> COMPLEX
static final InverterTask.Factory<Double> PRIMITIVE
MatrixStore<N> invert(MatrixStore<N> original) throws TaskException
TaskException
BasicMatrix.invert()
MatrixStore<N> invert(MatrixStore<N> original, 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 #getInverse()
.
preallocated
- 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
DecompositionStore<N> preallocate(Access2D<N> template)
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 implemented