Package org.ejml.dense.row.decompose.lu
Class LUDecompositionBase_CDRM
- java.lang.Object
-
- org.ejml.dense.row.decompose.lu.LUDecompositionBase_CDRM
-
- All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.CMatrixRMaj>,org.ejml.interfaces.decomposition.LUDecomposition<org.ejml.data.CMatrixRMaj>,org.ejml.interfaces.decomposition.LUDecomposition_F32<org.ejml.data.CMatrixRMaj>
- Direct Known Subclasses:
LUDecompositionAlt_CDRM
public abstract class LUDecompositionBase_CDRM extends java.lang.Object implements org.ejml.interfaces.decomposition.LUDecomposition_F32<org.ejml.data.CMatrixRMaj>Contains common data structures and operations for LU decomposition algorithms.
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]dataLUprotected org.ejml.data.Complex_F32detprotected int[]indxprotected org.ejml.data.CMatrixRMajLUprotected intmprotected intmaxWidthprotected intnprotected int[]pivotprotected floatpivsignprotected intstrideprotected float[]vv
-
Constructor Summary
Constructors Constructor Description LUDecompositionBase_CDRM()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]_getVV()void_solveVectorInternal(float[] vv)a specialized version of solve that avoid additional checks that are not needed.org.ejml.data.Complex_F32computeDeterminant()Computes the determinant from the LU decomposition.protected voiddecomposeCommonInit(org.ejml.data.CMatrixRMaj a)int[]getIndx()org.ejml.data.CMatrixRMajgetLower(org.ejml.data.CMatrixRMaj lower)Writes the lower triangular matrix into the specified matrix.org.ejml.data.CMatrixRMajgetLU()int[]getPivot()org.ejml.data.CMatrixRMajgetRowPivot(org.ejml.data.CMatrixRMaj pivot)int[]getRowPivotV(org.ejml.data.IGrowArray pivot)org.ejml.data.CMatrixRMajgetUpper(org.ejml.data.CMatrixRMaj upper)Writes the upper triangular matrix into the specified matrix.booleaninputModified()booleanisSingular()Determines if the decomposed matrix is singular.doublequality()voidsetExpectedMaxSize(int numRows, int numCols)protected voidsolveL(float[] vv)Solve the using the lower triangular matrix in LU.
-
-
-
Field Detail
-
LU
protected org.ejml.data.CMatrixRMaj LU
-
maxWidth
protected int maxWidth
-
m
protected int m
-
n
protected int n
-
stride
protected int stride
-
dataLU
protected float[] dataLU
-
vv
protected float[] vv
-
indx
protected int[] indx
-
pivot
protected int[] pivot
-
pivsign
protected float pivsign
-
det
protected org.ejml.data.Complex_F32 det
-
-
Method Detail
-
setExpectedMaxSize
public void setExpectedMaxSize(int numRows, int numCols)
-
getLU
public org.ejml.data.CMatrixRMaj getLU()
-
getIndx
public int[] getIndx()
-
getPivot
public int[] getPivot()
-
inputModified
public boolean inputModified()
- Specified by:
inputModifiedin interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.CMatrixRMaj>
-
getLower
public org.ejml.data.CMatrixRMaj getLower(org.ejml.data.CMatrixRMaj lower)
Writes the lower triangular matrix into the specified matrix.- Specified by:
getLowerin interfaceorg.ejml.interfaces.decomposition.LUDecomposition<org.ejml.data.CMatrixRMaj>- Parameters:
lower- Where the lower triangular matrix is written to.
-
getUpper
public org.ejml.data.CMatrixRMaj getUpper(org.ejml.data.CMatrixRMaj upper)
Writes the upper triangular matrix into the specified matrix.- Specified by:
getUpperin interfaceorg.ejml.interfaces.decomposition.LUDecomposition<org.ejml.data.CMatrixRMaj>- Parameters:
upper- Where the upper triangular matrix is writen to.
-
getRowPivot
public org.ejml.data.CMatrixRMaj getRowPivot(org.ejml.data.CMatrixRMaj pivot)
- Specified by:
getRowPivotin interfaceorg.ejml.interfaces.decomposition.LUDecomposition<org.ejml.data.CMatrixRMaj>
-
getRowPivotV
public int[] getRowPivotV(org.ejml.data.IGrowArray pivot)
- Specified by:
getRowPivotVin interfaceorg.ejml.interfaces.decomposition.LUDecomposition<org.ejml.data.CMatrixRMaj>
-
decomposeCommonInit
protected void decomposeCommonInit(org.ejml.data.CMatrixRMaj a)
-
isSingular
public boolean isSingular()
Determines if the decomposed matrix is singular. This function can return false and the matrix be almost singular, which is still bad.- Specified by:
isSingularin interfaceorg.ejml.interfaces.decomposition.LUDecomposition<org.ejml.data.CMatrixRMaj>- Returns:
- true if singular false otherwise.
-
computeDeterminant
public org.ejml.data.Complex_F32 computeDeterminant()
Computes the determinant from the LU decomposition.- Specified by:
computeDeterminantin interfaceorg.ejml.interfaces.decomposition.LUDecomposition_F32<org.ejml.data.CMatrixRMaj>- Returns:
- The matrix's determinant.
-
quality
public double quality()
-
_solveVectorInternal
public void _solveVectorInternal(float[] vv)
a specialized version of solve that avoid additional checks that are not needed.
-
solveL
protected void solveL(float[] vv)
Solve the using the lower triangular matrix in LU. Diagonal elements are assumed to be 1
-
_getVV
public float[] _getVV()
-
-