Class BidiagonalDecompositionRow_DDRM

java.lang.Object
org.ejml.dense.row.decomposition.bidiagonal.BidiagonalDecompositionRow_DDRM
All Implemented Interfaces:
org.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.DMatrixRMaj>, org.ejml.interfaces.decomposition.BidiagonalDecomposition_F64<org.ejml.data.DMatrixRMaj>, org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>
Direct Known Subclasses:
BidiagonalDecompositionRow_MT_DDRM

public class BidiagonalDecompositionRow_DDRM
extends java.lang.Object
implements org.ejml.interfaces.decomposition.BidiagonalDecomposition_F64<org.ejml.data.DMatrixRMaj>

Performs a BidiagonalDecomposition_F64 using householder reflectors. This is efficient on wide or square matrices.

  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected double[] b  
    protected double[] u  
  • Constructor Summary

    Constructors 
    Constructor Description
    BidiagonalDecompositionRow_DDRM()  
    BidiagonalDecompositionRow_DDRM​(int numElements)
    Creates a decompose that defines the specified amount of memory.
  • Method Summary

    Modifier and Type Method Description
    protected void computeU​(int k)  
    protected void computeV​(int k)  
    boolean decompose​(org.ejml.data.DMatrixRMaj A)
    Computes the decomposition of the provided matrix.
    org.ejml.data.DMatrixRMaj getB​(@Nullable org.ejml.data.DMatrixRMaj B, boolean compact)
    Returns the bidiagonal matrix.
    void getDiagonal​(double[] diag, double[] off)  
    double[] getGammasU()
    Returns gammas from the householder operations for the U matrix.
    double[] getGammasV()
    Returns gammas from the householder operations for the V matrix.
    org.ejml.data.DMatrixRMaj getU​(@Nullable org.ejml.data.DMatrixRMaj U, boolean transpose, boolean compact)
    Returns the orthogonal U matrix.
    org.ejml.data.DMatrixRMaj getUBV()
    The raw UBV matrix that is stored internally.
    org.ejml.data.DMatrixRMaj getV​(@Nullable org.ejml.data.DMatrixRMaj V, boolean transpose, boolean compact)
    Returns the orthogonal V matrix.
    static org.ejml.data.DMatrixRMaj handleB​(@Nullable org.ejml.data.DMatrixRMaj B, boolean compact, int m, int n, int min)  
    static org.ejml.data.DMatrixRMaj handleU​(@Nullable org.ejml.data.DMatrixRMaj U, boolean transpose, boolean compact, int m, int n, int min)  
    static org.ejml.data.DMatrixRMaj handleV​(@Nullable org.ejml.data.DMatrixRMaj V, boolean transpose, boolean compact, int m, int n, int min)  
    protected void init​(org.ejml.data.DMatrixRMaj A)
    Sets up internal data structures and creates a copy of the input matrix.
    boolean inputModified()  
    protected void rank1UpdateMultL​(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1)  
    protected void rank1UpdateMultR​(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1)  

    Methods inherited from class java.lang.Object

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

    • b

      protected double[] b
    • u

      protected double[] u
  • Constructor Details

  • Method Details

    • decompose

      public boolean decompose​(org.ejml.data.DMatrixRMaj A)
      Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise.
      Specified by:
      decompose in interface org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>
      Parameters:
      A - The matrix that is being decomposed. Not modified.
      Returns:
      If it detects any errors or not.
    • init

      protected void init​(org.ejml.data.DMatrixRMaj A)
      Sets up internal data structures and creates a copy of the input matrix.
      Parameters:
      A - The input matrix. Not modified.
    • getUBV

      public org.ejml.data.DMatrixRMaj getUBV()
      The raw UBV matrix that is stored internally.
      Returns:
      UBV matrix.
    • getDiagonal

      public void getDiagonal​(double[] diag, double[] off)
      Specified by:
      getDiagonal in interface org.ejml.interfaces.decomposition.BidiagonalDecomposition_F64<org.ejml.data.DMatrixRMaj>
    • getB

      public org.ejml.data.DMatrixRMaj getB​(@Nullable @Nullable org.ejml.data.DMatrixRMaj B, boolean compact)
      Returns the bidiagonal matrix.
      Specified by:
      getB in interface org.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.DMatrixRMaj>
      Parameters:
      B - If not null the results are stored here, if null a new matrix is created.
      Returns:
      The bidiagonal matrix.
    • handleB

      public static org.ejml.data.DMatrixRMaj handleB​(@Nullable @Nullable org.ejml.data.DMatrixRMaj B, boolean compact, int m, int n, int min)
    • getU

      public org.ejml.data.DMatrixRMaj getU​(@Nullable @Nullable org.ejml.data.DMatrixRMaj U, boolean transpose, boolean compact)
      Returns the orthogonal U matrix.
      Specified by:
      getU in interface org.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.DMatrixRMaj>
      Parameters:
      U - If not null then the results will be stored here. Otherwise a new matrix will be created.
      Returns:
      The extracted Q matrix.
    • handleU

      public static org.ejml.data.DMatrixRMaj handleU​(@Nullable @Nullable org.ejml.data.DMatrixRMaj U, boolean transpose, boolean compact, int m, int n, int min)
    • getV

      public org.ejml.data.DMatrixRMaj getV​(@Nullable @Nullable org.ejml.data.DMatrixRMaj V, boolean transpose, boolean compact)
      Returns the orthogonal V matrix.
      Specified by:
      getV in interface org.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.DMatrixRMaj>
      Parameters:
      V - If not null then the results will be stored here. Otherwise a new matrix will be created.
      Returns:
      The extracted Q matrix.
    • handleV

      public static org.ejml.data.DMatrixRMaj handleV​(@Nullable @Nullable org.ejml.data.DMatrixRMaj V, boolean transpose, boolean compact, int m, int n, int min)
    • computeU

      protected void computeU​(int k)
    • rank1UpdateMultL

      protected void rank1UpdateMultL​(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1)
    • rank1UpdateMultR

      protected void rank1UpdateMultR​(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1)
    • computeV

      protected void computeV​(int k)
    • getGammasU

      public double[] getGammasU()
      Returns gammas from the householder operations for the U matrix.
    • getGammasV

      public double[] getGammasV()
      Returns gammas from the householder operations for the V matrix.
    • inputModified

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