Class SvdImplicitQrDecompose_Ultimate

java.lang.Object
org.ejml.dense.row.decomposition.svd.SvdImplicitQrDecompose_Ultimate
All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>, org.ejml.interfaces.decomposition.SingularValueDecomposition<org.ejml.data.DMatrixRMaj>, org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj>

public class SvdImplicitQrDecompose_Ultimate extends Object implements org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj>

Similar to SvdImplicitQrDecompose_DDRM but it employs the ultimate shift strategy. Ultimate shift involves first computing singular values then uses those to quickly compute the U and W matrices. For EVD this strategy seems to work very well, but for this problem it needs to have little benefit and makes the code more complex.

NOTE: This code is much faster for 2x2 matrices since it computes the eigenvalues in one step.
  • Constructor Details

    • SvdImplicitQrDecompose_Ultimate

      public SvdImplicitQrDecompose_Ultimate(boolean compact, boolean computeU, boolean computeV)
  • Method Details

    • getSingularValues

      public double[] getSingularValues()
      Specified by:
      getSingularValues in interface org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj>
    • numberOfSingularValues

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

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

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

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

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

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

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

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

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