Package org.ejml.dense.row.decompose.lu
Class LUDecompositionBase_ZDRM
java.lang.Object
org.ejml.dense.row.decompose.lu.LUDecompositionBase_ZDRM
- All Implemented Interfaces:
 DecompositionInterface<ZMatrixRMaj>,LUDecomposition<ZMatrixRMaj>,LUDecomposition_F64<ZMatrixRMaj>
- Direct Known Subclasses:
 LUDecompositionAlt_ZDRM
public abstract class LUDecompositionBase_ZDRM
extends Object
implements LUDecomposition_F64<ZMatrixRMaj>
Contains common data structures and operations for LU decomposition algorithms.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondouble[]_getVV()void_solveVectorInternal(double[] vv) a specialized version of solve that avoid additional checks that are not needed.Computes the determinant from the LU decomposition.protected voidint[]getIndx()getLower(@Nullable ZMatrixRMaj lower) Writes the lower triangular matrix into the specified matrix.getLU()int[]getPivot()getRowPivot(@Nullable ZMatrixRMaj pivot) For numerical stability there are often row interchanges.int[]getRowPivotV(@Nullable IGrowArray pivot) Returns the row pivot vectorgetUpper(@Nullable ZMatrixRMaj upper) Writes the upper triangular matrix into the specified matrix.booleanChecks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.booleanDetermines if the decomposed matrix is singular.doublequality()voidsetExpectedMaxSize(int numRows, int numCols) protected voidsolveL(double[] vv) Solve the using the lower triangular matrix in LU.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ejml.interfaces.decomposition.DecompositionInterface
decompose 
- 
Field Details
- 
LU
 - 
maxWidth
protected int maxWidth - 
m
protected int m - 
n
protected int n - 
stride
protected int stride - 
dataLU
protected double[] dataLU - 
vv
protected double[] vv - 
indx
protected int[] indx - 
pivot
protected int[] pivot - 
pivsign
protected double pivsign - 
det
 
 - 
 - 
Constructor Details
- 
LUDecompositionBase_ZDRM
public LUDecompositionBase_ZDRM() 
 - 
 - 
Method Details
- 
setExpectedMaxSize
public void setExpectedMaxSize(int numRows, int numCols)  - 
getLU
 - 
getIndx
public int[] getIndx() - 
getPivot
public int[] getPivot() - 
inputModified
public boolean inputModified()Description copied from interface:DecompositionInterfaceChecks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.- Specified by:
 inputModifiedin interfaceDecompositionInterface<ZMatrixRMaj>- Returns:
 - true if the input matrix to decompose() is modified.
 
 - 
getLower
Writes the lower triangular matrix into the specified matrix.- Specified by:
 getLowerin interfaceLUDecomposition<ZMatrixRMaj>- Parameters:
 lower- Where the lower triangular matrix is written to.- Returns:
 - The L matrix.
 
 - 
getUpper
Writes the upper triangular matrix into the specified matrix.- Specified by:
 getUpperin interfaceLUDecomposition<ZMatrixRMaj>- Parameters:
 upper- Where the upper triangular matrix is writen to.- Returns:
 - The U matrix.
 
 - 
getRowPivot
Description copied from interface:LUDecompositionFor numerical stability there are often row interchanges. This computes a pivot matrix that will undo those changes.
- Specified by:
 getRowPivotin interfaceLUDecomposition<ZMatrixRMaj>- Parameters:
 pivot- Storage for the pivot matrix. If null then a new matrix is returned. Modified.- Returns:
 - The pivot matrix.
 
 - 
getRowPivotV
Description copied from interface:LUDecompositionReturns the row pivot vector- Specified by:
 getRowPivotVin interfaceLUDecomposition<ZMatrixRMaj>- Parameters:
 pivot- (Optional) Storage for pivot vector- Returns:
 - The pivot vector
 
 - 
decomposeCommonInit
 - 
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 interfaceLUDecomposition<ZMatrixRMaj>- Returns:
 - true if singular false otherwise.
 
 - 
computeDeterminant
Computes the determinant from the LU decomposition.- Specified by:
 computeDeterminantin interfaceLUDecomposition_F64<ZMatrixRMaj>- Returns:
 - The matrix's determinant.
 
 - 
quality
public double quality() - 
_solveVectorInternal
public void _solveVectorInternal(double[] vv) a specialized version of solve that avoid additional checks that are not needed. - 
solveL
protected void solveL(double[] vv) Solve the using the lower triangular matrix in LU. Diagonal elements are assumed to be 1 - 
_getVV
public double[] _getVV() 
 -