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

All Superinterfaces:
Serializable
All Known Subinterfaces:
Cholesky<N>, Eigenvalue<N>, LU<N>, QR<N>, SingularValue<N>
All Known Implementing Classes:
CholeskyDecomposition, EigenvalueDecomposition, JamaCholesky, JamaEigenvalue, JamaLU, JamaQR, JamaSingularValue, LUDecomposition, QRDecomposition, SingularValueDecomposition

public interface MatrixDecomposition<N extends Number>
extends Serializable

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(BasicMatrix aMtrx, 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()
           
 void reset()
           
 MatrixStore<N> solve(MatrixStore<N> aRHS)
           
 Future<DecomposeAndSolve<N>> solve(MatrixStore<N> aBody, MatrixStore<N> aRHS)
          Will solve [aBody][X]=[aRHS] concurrently by first calling compute(MatrixStore) using [aBody], and then solve(MatrixStore) using [aRHS].
 

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(BasicMatrix aMtrx,
               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()

reset

void reset()

solve

MatrixStore<N> solve(MatrixStore<N> aRHS)

solve

Future<DecomposeAndSolve<N>> solve(MatrixStore<N> aBody,
                                   MatrixStore<N> aRHS)
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]