Class TridiagonalDecompositionHouseholder_FDRM

java.lang.Object
org.ejml.dense.row.decomposition.hessenberg.TridiagonalDecompositionHouseholder_FDRM
All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>, org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.FMatrixRMaj>, org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F32<org.ejml.data.FMatrixRMaj>
Direct Known Subclasses:
TridiagonalDecompositionHouseholder_MT_FDRM

@Generated("org.ejml.dense.row.decomposition.hessenberg.TridiagonalDecompositionHouseholder_DDRM")
public class TridiagonalDecompositionHouseholder_FDRM
extends Object
implements org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F32<org.ejml.data.FMatrixRMaj>

Performs a similar tridiagonal decomposition on a square symmetric input matrix. Householder vectors perform the similar operation and the symmetry is taken advantage of for good performance.

Finds the decomposition of a matrix in the form of:

A = O*T*OT

where A is a symmetric m by m matrix, O is an orthogonal matrix, and T is a tridiagonal matrix.

This implementation is based off of the algorithm described in:

David S. Watkins, "Fundamentals of Matrix Computations," Second Edition. Page 349-355

  • Field Summary

    Fields
    Modifier and Type Field Description
    protected float[] b  
    protected float[] gammas  
    protected int N  
    protected org.ejml.data.FMatrixRMaj QT
    Only the upper right triangle is used.
    protected float[] w  
  • Constructor Summary

    Constructors
    Constructor Description
    TridiagonalDecompositionHouseholder_FDRM()  
  • Method Summary

    Modifier and Type Method Description
    boolean decompose​(org.ejml.data.FMatrixRMaj A)
    Decomposes the provided symmetric matrix.
    void getDiagonal​(float[] diag, float[] off)  
    org.ejml.data.FMatrixRMaj getQ​(@Nullable org.ejml.data.FMatrixRMaj Q, boolean transposed)
    An orthogonal matrix that has the following property: T = QTAQ
    org.ejml.data.FMatrixRMaj getQT()
    Returns the internal matrix where the decomposed results are stored.
    org.ejml.data.FMatrixRMaj getT​(@Nullable org.ejml.data.FMatrixRMaj T)
    Extracts the tridiagonal matrix found in the decomposition.
    void householderSymmetric​(int row, float gamma)
    Performs the householder operations on left and right and side of the matrix.
    void init​(org.ejml.data.FMatrixRMaj A)
    If needed declares and sets up internal data structures.
    boolean inputModified()  
    protected void rank1UpdateMultL​(org.ejml.data.FMatrixRMaj A, float gamma, int colA0, int w0, int w1)  
    protected void rank1UpdateMultR​(org.ejml.data.FMatrixRMaj A, float 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

    • QT

      protected org.ejml.data.FMatrixRMaj QT
      Only the upper right triangle is used. The Tridiagonal portion stores the tridiagonal matrix. The rows store householder vectors.
    • N

      protected int N
    • w

      protected float[] w
    • gammas

      protected float[] gammas
    • b

      protected float[] b
  • Constructor Details

    • TridiagonalDecompositionHouseholder_FDRM

      public TridiagonalDecompositionHouseholder_FDRM()
  • Method Details

    • getQT

      public org.ejml.data.FMatrixRMaj getQT()
      Returns the internal matrix where the decomposed results are stored.
    • getDiagonal

      public void getDiagonal​(float[] diag, float[] off)
      Specified by:
      getDiagonal in interface org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F32<org.ejml.data.FMatrixRMaj>
    • getT

      public org.ejml.data.FMatrixRMaj getT​(@Nullable @Nullable org.ejml.data.FMatrixRMaj T)
      Extracts the tridiagonal matrix found in the decomposition.
      Specified by:
      getT in interface org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.FMatrixRMaj>
      Parameters:
      T - If not null then the results will be stored here. Otherwise a new matrix will be created.
      Returns:
      The extracted T matrix.
    • getQ

      public org.ejml.data.FMatrixRMaj getQ​(@Nullable @Nullable org.ejml.data.FMatrixRMaj Q, boolean transposed)
      An orthogonal matrix that has the following property: T = QTAQ
      Specified by:
      getQ in interface org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.FMatrixRMaj>
      Parameters:
      Q - If not null then the results will be stored here. Otherwise a new matrix will be created.
      Returns:
      The extracted Q matrix.
    • decompose

      public boolean decompose​(org.ejml.data.FMatrixRMaj A)
      Decomposes the provided symmetric matrix.
      Specified by:
      decompose in interface org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
      Parameters:
      A - Symmetric matrix that is going to be decomposed. Not modified.
    • householderSymmetric

      public void householderSymmetric​(int row, float gamma)
      Performs the householder operations on left and right and side of the matrix. QTAQ
      Parameters:
      row - Specifies the submatrix.
      gamma - The gamma for the householder operation
    • init

      public void init​(org.ejml.data.FMatrixRMaj A)
      If needed declares and sets up internal data structures.
      Parameters:
      A - Matrix being decomposed.
    • rank1UpdateMultL

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

      protected void rank1UpdateMultR​(org.ejml.data.FMatrixRMaj A, float gamma, int colA0, int w0, int w1)
    • inputModified

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