Class SvdImplicitQrDecompose_FDRM

java.lang.Object
org.ejml.dense.row.decomposition.svd.SvdImplicitQrDecompose_FDRM
All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>, org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>, org.ejml.interfaces.decomposition.SingularValueDecomposition_F32<org.ejml.data.FMatrixRMaj>
Direct Known Subclasses:
SvdImplicitQrDecompose_MT_FDRM

@Generated("org.ejml.dense.row.decomposition.svd.SvdImplicitQrDecompose_DDRM")
public class SvdImplicitQrDecompose_FDRM
extends java.lang.Object
implements org.ejml.interfaces.decomposition.SingularValueDecomposition_F32<org.ejml.data.FMatrixRMaj>

Computes the Singular value decomposition of a matrix using the implicit QR algorithm for singular value decomposition. It works by first by transforming the matrix to a bidiagonal A=U*B*VT form, then it implicitly computing the eigenvalues of the BTB matrix, which are the same as the singular values in the original A matrix.

Based off of the description provided in:

David S. Watkins, "Fundamentals of Matrix Computations," Second Edition. Page 404-411

  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.ejml.interfaces.decomposition.BidiagonalDecomposition_F32<org.ejml.data.FMatrixRMaj> bidiag  
    protected boolean canUseTallBidiagonal  
    protected boolean compact  
    protected boolean computeU  
    protected boolean computeV  
    protected int numCols  
    protected int numColsT  
    protected int numRows  
    protected int numRowsT  
    protected boolean prefComputeU  
    protected boolean prefComputeV  
    protected SvdImplicitQrAlgorithm_FDRM qralg  
    protected boolean transposed  
  • Constructor Summary

    Constructors 
    Constructor Description
    SvdImplicitQrDecompose_FDRM​(boolean compact, boolean computeU, boolean computeV, boolean canUseTallBidiagonal)
    Configures the class
  • Method Summary

    Modifier and Type Method Description
    protected void declareBidiagonalDecomposition()  
    boolean decompose​(org.ejml.data.FMatrixRMaj orig)  
    float[] getSingularValues()  
    org.ejml.data.FMatrixRMaj getU​(@Nullable org.ejml.data.FMatrixRMaj U, boolean transpose)  
    org.ejml.data.FMatrixRMaj getV​(@Nullable org.ejml.data.FMatrixRMaj V, boolean transpose)  
    org.ejml.data.FMatrixRMaj getW​(@Nullable org.ejml.data.FMatrixRMaj W)  
    boolean inputModified()  
    boolean isCompact()  
    int numberOfSingularValues()  
    int numCols()  
    int numRows()  
    protected void transpose​(@NotNull org.ejml.data.FMatrixRMaj V, org.ejml.data.FMatrixRMaj Vt)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SvdImplicitQrDecompose_FDRM

      public SvdImplicitQrDecompose_FDRM​(boolean compact, boolean computeU, boolean computeV, boolean canUseTallBidiagonal)
      Configures the class
      Parameters:
      compact - Compute a compact SVD
      computeU - If true it will compute the U matrix
      computeV - If true it will compute the V matrix
      canUseTallBidiagonal - If true then it can choose to use a tall Bidiagonal decomposition to improve runtime performance.
  • Method Details

    • getSingularValues

      public float[] getSingularValues()
      Specified by:
      getSingularValues in interface org.ejml.interfaces.decomposition.SingularValueDecomposition_F32<org.ejml.data.FMatrixRMaj>
    • numberOfSingularValues

      public int numberOfSingularValues()
      Specified by:
      numberOfSingularValues in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>
    • isCompact

      public boolean isCompact()
      Specified by:
      isCompact in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>
    • getU

      public org.ejml.data.FMatrixRMaj getU​(@Nullable @Nullable org.ejml.data.FMatrixRMaj U, boolean transpose)
      Specified by:
      getU in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>
    • getV

      public org.ejml.data.FMatrixRMaj getV​(@Nullable @Nullable org.ejml.data.FMatrixRMaj V, boolean transpose)
      Specified by:
      getV in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>
    • transpose

      protected void transpose​(@NotNull @NotNull org.ejml.data.FMatrixRMaj V, org.ejml.data.FMatrixRMaj Vt)
    • getW

      public org.ejml.data.FMatrixRMaj getW​(@Nullable @Nullable org.ejml.data.FMatrixRMaj W)
      Specified by:
      getW in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>
    • decompose

      public boolean decompose​(org.ejml.data.FMatrixRMaj orig)
      Specified by:
      decompose in interface org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
    • inputModified

      public boolean inputModified()
      Specified by:
      inputModified in interface org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
    • declareBidiagonalDecomposition

      protected void declareBidiagonalDecomposition()
    • numRows

      public int numRows()
      Specified by:
      numRows in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>
    • numCols

      public int numCols()
      Specified by:
      numCols in interface org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.FMatrixRMaj>