Module ojalgo
Package org.ojalgo.matrix.task
Interface InverterTask<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:
AbstractInverter,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,HermitianEvD,HermitianEvD.C128,HermitianEvD.H256,HermitianEvD.Q128,HermitianEvD.R064,HermitianEvD.R128,RawCholesky,RawEigenvalue.Symmetric,RawLU,RawQR,RawSingularValue,SparseLU,SparseQDLDL
public interface InverterTask<N extends java.lang.Comparable<N>> extends MatrixTask<N>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classInverterTask.Factory<N extends java.lang.Comparable<N>>
-
Field Summary
Fields Modifier and Type Field Description static InverterTask.Factory<ComplexNumber>C128static InverterTask.Factory<Quaternion>H256static InverterTask.Factory<RationalNumber>Q128static InverterTask.Factory<java.lang.Double>R064static InverterTask.Factory<Quadruple>R128
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MatrixStore<N>invert(Access2D<?> original)The output must be a "right inverse" and a "generalised inverse".MatrixStore<N>invert(Access2D<?> original, PhysicalStore<N> preallocated)Exactly how (if at all) a specific implementation makes use ofpreallocatedis not specified by this interface.PhysicalStore<N>preallocate(int nbRows, int nbCols)default PhysicalStore<N>preallocate(Structure2D template)Will create a PhysicalStore instance suitable for use withinvert(Access2D, PhysicalStore).default Provider2D.Inverse<java.util.Optional<MatrixStore<N>>>toInverseProvider(ElementsSupplier<N> original, java.util.function.Supplier<MatrixStore<N>> alternativeOriginalSupplier)
-
-
-
Field Detail
-
C128
static final InverterTask.Factory<ComplexNumber> C128
-
R064
static final InverterTask.Factory<java.lang.Double> R064
-
R128
static final InverterTask.Factory<Quadruple> R128
-
H256
static final InverterTask.Factory<Quaternion> H256
-
Q128
static final InverterTask.Factory<RationalNumber> Q128
-
-
Method Detail
-
invert
default MatrixStore<N> invert(Access2D<?> original) throws RecoverableCondition
The output must be a "right inverse" and a "generalised inverse".- Throws:
RecoverableCondition
-
invert
MatrixStore<N> invert(Access2D<?> original, 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
invert(Access2D).Use
preallocate(Structure2D)to obtain a suitbalepreallocated.- Parameters:
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.- Returns:
- The inverse
- Throws:
RecoverableCondition- TODO
-
preallocate
PhysicalStore<N> preallocate(int nbRows, int nbCols)
-
preallocate
default PhysicalStore<N> preallocate(Structure2D template)
Will create a PhysicalStore instance suitable for use with
invert(Access2D, PhysicalStore).When inverting a matrix (mxn) the preallocated memory/matrix will typically be nxm (and of course most of the time A is square).
-
toInverseProvider
default Provider2D.Inverse<java.util.Optional<MatrixStore<N>>> toInverseProvider(ElementsSupplier<N> original, java.util.function.Supplier<MatrixStore<N>> alternativeOriginalSupplier)
-
-