org.ojalgo.matrix.decomposition
Interface MatrixDecomposition<N extends Number>

All Known Subinterfaces:
Bidiagonal<N>, Cholesky<N>, Eigenvalue<N>, Hessenberg<N>, LU<N>, QR<N>, Schur<N>, SingularValue<N>, Tridiagonal<N>
All Known Implementing Classes:
BidiagonalDecomposition, CholeskyDecomposition, EigenvalueDecomposition, HessenbergDecomposition, JamaCholesky, JamaEigenvalue, JamaEigenvalue.General, JamaEigenvalue.Nonsymmetric, JamaEigenvalue.Symmetric, JamaLU, JamaQR, JamaSingularValue, LUDecomposition, QRDecomposition, SchurDecomposition, SingularValueDecomposition, TridiagonalDecomposition

public interface MatrixDecomposition<N extends Number>

Some standard matrix names:

With the above definitions we can express various decompositions as:

Author:
apete

Method Summary
 boolean compute(Access2D<?> aMtrx)
           
 boolean equals(MatrixDecomposition<N> aDecomp, NumberContext aCntxt)
           
 boolean equals(MatrixStore<N> aMtrx, NumberContext aCntxt)
           
 MatrixStore<N> getInverse()
          The output must be a "right inverse" and a "generalised inverse".
 MatrixStore<N> getInverse(DecompositionStore<N> preallocated)
           Implementiong this method is optional.
 boolean isComputed()
           
 boolean isFullSize()
           
 boolean isSolvable()
           
 MatrixStore<N> reconstruct()
           
 void reset()
          Delete computed results, and resets attributes to default values
 MatrixStore<N> solve(MatrixStore<N> aRHS)
          [A][X]=[B] or [this][return]=[aRHS]
 MatrixStore<N> solve(MatrixStore<N> aRHS, DecompositionStore<N> preallocated)
           Implementiong this method is optional.
 

Method Detail

compute

boolean compute(Access2D<?> aMtrx)
Parameters:
aMtrx - A matrix to decompose
Returns:
true if the computation suceeded; false if not

equals

boolean equals(MatrixDecomposition<N> aDecomp,
               NumberContext aCntxt)

equals

boolean equals(MatrixStore<N> aMtrx,
               NumberContext aCntxt)

getInverse

MatrixStore<N> getInverse()
The output must be a "right inverse" and a "generalised inverse".

See Also:
BasicMatrix.invert()

getInverse

MatrixStore<N> getInverse(DecompositionStore<N> preallocated)

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().

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

isComputed

boolean isComputed()
Returns:
true if computation has been attemped; false if not.
See Also:
compute(Access2D), isSolvable()

isFullSize

boolean isFullSize()
Returns:
True if the implementation generates a full sized decomposition.

isSolvable

boolean isSolvable()
Returns:
true if it is ok to call solve(MatrixStore) (computation was successful); false if not
See Also:
solve(MatrixStore), isComputed()

reconstruct

MatrixStore<N> reconstruct()

reset

void reset()
Delete computed results, and resets attributes to default values


solve

MatrixStore<N> solve(MatrixStore<N> aRHS)
[A][X]=[B] or [this][return]=[aRHS]


solve

MatrixStore<N> solve(MatrixStore<N> aRHS,
                     DecompositionStore<N> preallocated)

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(MatrixStore).

Parameters:
aRHS - The Right Hand Side, wont be modfied
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 solution