Class HessenbergSimilarDecomposition_DDRM

java.lang.Object
org.ejml.dense.row.decomposition.hessenberg.HessenbergSimilarDecomposition_DDRM
All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>
Direct Known Subclasses:
HessenbergSimilarDecomposition_MT_DDRM

public class HessenbergSimilarDecomposition_DDRM extends Object implements org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>

Finds the decomposition of a matrix in the form of:

A = OHOT

where A is an m by m matrix, O is an orthogonal matrix, and H is an upper Hessenberg matrix.

A matrix is upper Hessenberg if aij = 0 for all i > j+1. For example, the following matrix is upper Hessenberg.

WRITE IT OUT USING A TABLE

This decomposition is primarily used as a step for computing the eigenvalue decomposition of a matrix. The basic algorithm comes from David S. Watkins, "Fundamentals of MatrixComputations" Second Edition.

  • Field Summary

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

    Constructors
    Constructor
    Description
     
    Creates a decomposition that won't need to allocate new memory if it is passed matrices up to the specified size.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    decompose(org.ejml.data.DMatrixRMaj A)
    Computes the decomposition of the provided matrix.
    double[]
     
    org.ejml.data.DMatrixRMaj
    getH(@Nullable org.ejml.data.DMatrixRMaj H)
    An upper Hessenberg matrix from the decomposition.
    org.ejml.data.DMatrixRMaj
    getQ(@Nullable org.ejml.data.DMatrixRMaj Q)
    An orthogonal matrix that has the following property: H = QTAQ
    org.ejml.data.DMatrixRMaj
    The raw QH matrix that is stored internally.
    boolean
     
    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

    • HessenbergSimilarDecomposition_DDRM

      public HessenbergSimilarDecomposition_DDRM(int initialSize)
      Creates a decomposition that won't need to allocate new memory if it is passed matrices up to the specified size.
      Parameters:
      initialSize - Expected size of the matrices it will decompose.
    • HessenbergSimilarDecomposition_DDRM

      public HessenbergSimilarDecomposition_DDRM()
  • 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.
    • inputModified

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

      public org.ejml.data.DMatrixRMaj getQH()
      The raw QH matrix that is stored internally.
      Returns:
      QH matrix.
    • getH

      public org.ejml.data.DMatrixRMaj getH(@Nullable @Nullable org.ejml.data.DMatrixRMaj H)
      An upper Hessenberg matrix from the decomposition.
      Parameters:
      H - If not null then the results will be stored here. Otherwise a new matrix will be created.
      Returns:
      The extracted H matrix.
    • getQ

      public org.ejml.data.DMatrixRMaj getQ(@Nullable @Nullable org.ejml.data.DMatrixRMaj Q)
      An orthogonal matrix that has the following property: H = QTAQ
      Parameters:
      Q - If not null then the results will be stored here. Otherwise a new matrix will be created.
      Returns:
      The extracted Q matrix.
    • 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)
    • getGammas

      public double[] getGammas()