org.ejml.alg.dense.decomposition.chol
Class CholeskyDecompositionCommon_D64
- java.lang.Object
-
- org.ejml.alg.dense.decomposition.chol.CholeskyDecompositionCommon_D64
-
- All Implemented Interfaces:
- CholeskyDecomposition<DenseMatrix64F>, DecompositionInterface<DenseMatrix64F>
- Direct Known Subclasses:
- CholeskyDecompositionBlock_D64, CholeskyDecompositionInner_D64
public abstract class CholeskyDecompositionCommon_D64 extends java.lang.Object implements CholeskyDecomposition<DenseMatrix64F>
This is an abstract class for a Cholesky decomposition. It provides the solvers, but the actual decomposition is provided in other classes.
- See Also:
CholeskyDecomposition
-
-
Constructor Summary
Constructors Constructor and Description CholeskyDecompositionCommon_D64(boolean lower)Specifies if a lower or upper variant should be constructed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]_getVV()Complex64FcomputeDeterminant()Computes the matrix's determinant using the decomposition.booleandecompose(DenseMatrix64F mat)Performs Choleksy decomposition on the provided matrix.DenseMatrix64FgetT()Returns the triangular matrix from the decomposition.DenseMatrix64FgetT(DenseMatrix64F T)Returns the triangular matrix from the decomposition.booleaninputModified()Is the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.booleanisLower()If true the decomposition was for a lower triangular matrix.voidsetExpectedMaxSize(int numRows, int numCols)
-
-
-
Constructor Detail
-
CholeskyDecompositionCommon_D64
public CholeskyDecompositionCommon_D64(boolean lower)
Specifies if a lower or upper variant should be constructed.- Parameters:
lower- should a lower or upper triangular matrix be used.
-
-
Method Detail
-
setExpectedMaxSize
public void setExpectedMaxSize(int numRows, int numCols)
-
isLower
public boolean isLower()
If true the decomposition was for a lower triangular matrix. If false it was for an upper triangular matrix.- Specified by:
isLowerin interfaceCholeskyDecomposition<DenseMatrix64F>- Returns:
- True if lower, false if upper.
-
decompose
public boolean decompose(DenseMatrix64F mat)
Performs Choleksy decomposition on the provided matrix.
If the matrix is not positive definite then this function will return false since it can't complete its computations. Not all errors will be found. This is an efficient way to check for positive definiteness.
- Specified by:
decomposein interfaceDecompositionInterface<DenseMatrix64F>- Parameters:
mat- A symmetric positive definite matrix with n <= widthMax.- Returns:
- True if it was able to finish the decomposition.
-
inputModified
public boolean inputModified()
Description copied from interface:DecompositionInterfaceIs the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.- Specified by:
inputModifiedin interfaceDecompositionInterface<DenseMatrix64F>- Returns:
- true if the input matrix to decompose() is modified.
-
getT
public DenseMatrix64F getT(DenseMatrix64F T)
Description copied from interface:CholeskyDecompositionReturns the triangular matrix from the decomposition.
If an input is provided that matrix is used to write the results to. Otherwise a new matrix is created and the results written to it.
- Specified by:
getTin interfaceCholeskyDecomposition<DenseMatrix64F>- Parameters:
T- If not null then the decomposed matrix is written here.- Returns:
- A lower or upper triangular matrix.
-
getT
public DenseMatrix64F getT()
Returns the triangular matrix from the decomposition.- Returns:
- A lower or upper triangular matrix.
-
_getVV
public double[] _getVV()
-
computeDeterminant
public Complex64F computeDeterminant()
Description copied from interface:CholeskyDecompositionComputes the matrix's determinant using the decomposition.- Specified by:
computeDeterminantin interfaceCholeskyDecomposition<DenseMatrix64F>- Returns:
- The determinant.
-
-
DMelt 3.0 © DataMelt by jWork.ORG