Class LUDecompositionBase_FDRM

java.lang.Object
org.ejml.dense.row.decomposition.lu.LUDecompositionBase_FDRM
All Implemented Interfaces:
DecompositionInterface<FMatrixRMaj>, LUDecomposition<FMatrixRMaj>, LUDecomposition_F32<FMatrixRMaj>
Direct Known Subclasses:
LUDecompositionAlt_FDRM

@Generated("org.ejml.dense.row.decomposition.lu.LUDecompositionBase_DDRM")
public abstract class LUDecompositionBase_FDRM
extends Object
implements LUDecomposition_F32<FMatrixRMaj>

Contains common data structures and operations for LU decomposition algorithms.

  • Field Details

    • LU

      protected FMatrixRMaj LU
    • maxWidth

      protected int maxWidth
    • m

      protected int m
    • n

      protected int n
    • dataLU

      protected float[] dataLU
    • vv

      protected float[] vv
    • indx

      protected int[] indx
    • pivot

      protected int[] pivot
    • pivsign

      protected float pivsign
  • Constructor Details

    • LUDecompositionBase_FDRM

      public LUDecompositionBase_FDRM()
  • Method Details

    • setExpectedMaxSize

      public void setExpectedMaxSize​(int numRows, int numCols)
    • getLU

      public FMatrixRMaj getLU()
    • getIndx

      public int[] getIndx()
    • getPivot

      public int[] getPivot()
    • inputModified

      public boolean inputModified()
      Description copied from interface: DecompositionInterface
      Is the input matrix to DecompositionInterface.decompose(org.ejml.data.Matrix) is modified during the decomposition process.
      Specified by:
      inputModified in interface DecompositionInterface<FMatrixRMaj>
      Returns:
      true if the input matrix to decompose() is modified.
    • getLower

      public FMatrixRMaj getLower​(@Nullable @Nullable FMatrixRMaj lower)
      Writes the lower triangular matrix into the specified matrix.
      Specified by:
      getLower in interface LUDecomposition<FMatrixRMaj>
      Parameters:
      lower - Where the lower triangular matrix is written to.
      Returns:
      The L matrix.
    • getUpper

      public FMatrixRMaj getUpper​(@Nullable @Nullable FMatrixRMaj upper)
      Writes the upper triangular matrix into the specified matrix.
      Specified by:
      getUpper in interface LUDecomposition<FMatrixRMaj>
      Parameters:
      upper - Where the upper triangular matrix is writen to.
      Returns:
      The U matrix.
    • getRowPivot

      public FMatrixRMaj getRowPivot​(@Nullable @Nullable FMatrixRMaj pivot)
      Description copied from interface: LUDecomposition

      For numerical stability there are often row interchanges. This computes a pivot matrix that will undo those changes.

      Specified by:
      getRowPivot in interface LUDecomposition<FMatrixRMaj>
      Parameters:
      pivot - Storage for the pivot matrix. If null then a new matrix is returned. Modified.
      Returns:
      The pivot matrix.
    • getRowPivotV

      public int[] getRowPivotV​(@Nullable @Nullable IGrowArray pivot)
      Description copied from interface: LUDecomposition
      Returns the row pivot vector
      Specified by:
      getRowPivotV in interface LUDecomposition<FMatrixRMaj>
      Parameters:
      pivot - (Optional) Storage for pivot vector
      Returns:
      The pivot vector
    • decomposeCommonInit

      protected void decomposeCommonInit​(FMatrixRMaj 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:
      isSingular in interface LUDecomposition<FMatrixRMaj>
      Returns:
      true if singular false otherwise.
    • computeDeterminant

      public Complex_F32 computeDeterminant()
      Computes the determinant from the LU decomposition.
      Specified by:
      computeDeterminant in interface LUDecomposition_F32<FMatrixRMaj>
      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.
    • _getVV

      public float[] _getVV()