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, JamaLU, JamaQR, JamaSingularValue, LUDecomposition, QRDecomposition, 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(MatrixStore<N> aStore)
           
 boolean equals(MatrixDecomposition<N> aDecomp, NumberContext aCntxt)
           
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 MatrixStore<N> getInverse()
          The output must be a "right inverse" and a "generalised inverse".
 MatrixStore<N> invert(MatrixStore<N> aStore)
          A convenience method that produces exactly the same result as if you first call compute(MatrixStore) and then getInverse().
 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)
           
 Future<DecomposeAndSolve<N>> solve(MatrixStore<N> aBody, MatrixStore<N> aRHS)
          Deprecated. v30 Just realised this can't work (unless you're lucky) the way it is implemented. Wont fix - will remove!
 

Method Detail

compute

boolean compute(MatrixStore<N> aStore)
Parameters:
aStore - 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> aStore,
               NumberContext aCntxt)

getInverse

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

See Also:
BasicMatrix.invert()

invert

MatrixStore<N> invert(MatrixStore<N> aStore)
A convenience method that produces exactly the same result as if you first call compute(MatrixStore) and then getInverse().


isComputed

boolean isComputed()
Returns:
true if computation has been attemped; false if not.
See Also:
compute(MatrixStore), 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)

solve

@Deprecated
Future<DecomposeAndSolve<N>> solve(MatrixStore<N> aBody,
                                              MatrixStore<N> aRHS)
Deprecated. v30 Just realised this can't work (unless you're lucky) the way it is implemented. Wont fix - will remove!

Will solve [aBody][X]=[aRHS] concurrently by first calling compute(MatrixStore) using [aBody], and then solve(MatrixStore) using [aRHS]. If either of the input [aBody] or [aRHS] is set to null the corresponing calculation is skipped.

Parameters:
aBody - The equation system body
aRHS - The equation system right hand side
Returns:
The matrix decomposition and the equation system solution, [X]