org.ojalgo.matrix.decomposition
Class Chol0<N extends Number>
java.lang.Object
org.ojalgo.matrix.decomposition.CholeskyDecomposition<N>
org.ojalgo.matrix.decomposition.Chol0<N>
- All Implemented Interfaces:
- Cholesky<N>, MatrixDecomposition<N>
public abstract class Chol0<N extends Number>
- extends CholeskyDecomposition<N>
|
Field Summary |
static boolean |
DEBUG
|
DEBUG
public static boolean DEBUG
compute
public boolean compute(MatrixStore<N> aStore)
- Parameters:
aStore - A matrix to decompose
- Returns:
- true if the computation suceeded; false if not
computeWithCheck
public boolean computeWithCheck(MatrixStore<N> aStore)
equals
public final boolean equals(MatrixStore<N> aStore,
NumberContext aCntxt)
getDeterminant
public N getDeterminant()
getInverse
public MatrixStore<N> getInverse()
- Description copied from interface:
MatrixDecomposition
- The output must be a "right inverse" and a "generalised inverse".
- See Also:
BasicMatrix.invert()
getL
public MatrixStore<N> getL()
isFullSize
public final boolean isFullSize()
- Returns:
- True if the implementation generates a full sized decomposition.
isSolvable
public boolean isSolvable()
- Returns:
- true if it is ok to call MatrixDecomposition.solve(MatrixStore)
(computation was successful); false if not
- See Also:
MatrixDecomposition.solve(MatrixStore),
MatrixDecomposition.isComputed()
isSPD
public boolean isSPD()
- Description copied from interface:
Cholesky
- To use the Cholesky decomposition rather than the LU decomposition the
matrix must be symmetric and positive definite. It is recommended that
the decomposition algorithm checks for this during calculation. Possibly
the matrix could be assumed to be symmetric (to improve performance) but
tests should be made to assure the matrix is positive definite.
- Returns:
- true if the tests did not fail.
reset
public void reset()
- Specified by:
reset in interface MatrixDecomposition<N extends Number>
solve
public MatrixStore<N> solve(MatrixStore<N> aRHS)
- Solves [this][X] = [aRHS] by first solving
[L][Y] = [aRHS]
and then
[U][X] = [Y]
.
- Parameters:
aRHS - The right hand side
- Returns:
- [X]
equals
public boolean equals(MatrixDecomposition<N> aDecomp,
NumberContext aCntxt)
- Specified by:
equals in interface MatrixDecomposition<N extends Number>
equals
public boolean equals(Object someObj)
- Overrides:
equals in class Object
invert
public final MatrixStore<N> invert(MatrixStore<N> aStore)
- Description copied from interface:
MatrixDecomposition
- A convenience method that produces exactly the same result as if
you first call MatrixDecomposition.compute(MatrixStore) and then MatrixDecomposition.getInverse().
- Specified by:
invert in interface MatrixDecomposition<N extends Number>
isComputed
public boolean isComputed()
- Specified by:
isComputed in interface MatrixDecomposition<N extends Number>
- Returns:
- true if computation has been attemped; false if not.
- See Also:
MatrixDecomposition.compute(MatrixStore),
MatrixDecomposition.isSolvable()
solve
public Future<DecomposeAndSolve<N>> solve(MatrixStore<N> aBody,
MatrixStore<N> aRHS)
- Description copied from interface:
MatrixDecomposition
- Will solve [aBody][X]=[aRHS] concurrently by first calling
MatrixDecomposition.compute(MatrixStore) using [aBody], and then
MatrixDecomposition.solve(MatrixStore) using [aRHS]. If either of the input [aBody]
or [aRHS] is set to null the corresponing calculation is skipped.
- Specified by:
solve in interface MatrixDecomposition<N extends Number>
- Parameters:
aBody - The equation system bodyaRHS - The equation system right hand side
- Returns:
- The matrix decomposition and the equation system solution, [X]