Class TridiagonalDecompositionHouseholder_ZDRM

All Implemented Interfaces:
DecompositionInterface<ZMatrixRMaj>, TridiagonalSimilarDecomposition<ZMatrixRMaj>, TridiagonalSimilarDecomposition_F64<ZMatrixRMaj>

public class TridiagonalDecompositionHouseholder_ZDRM extends Object implements TridiagonalSimilarDecomposition_F64<ZMatrixRMaj>

Performs a complex similar tridiagonal decomposition on a square Hermitian 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*OH

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

This implementation is inspired by description of the real symmetric decomposition in:

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

  • Constructor Details

    • TridiagonalDecompositionHouseholder_ZDRM

      public TridiagonalDecompositionHouseholder_ZDRM()
  • Method Details

    • getQT

      public ZMatrixRMaj getQT()
      Returns the internal matrix where the decomposed results are stored.
    • getDiagonal

      public void getDiagonal(double[] diag, double[] off)
      Description copied from interface: TridiagonalSimilarDecomposition_F64
      Extracts the diagonal and off diagonal elements of the decomposed tridiagonal matrix. Since it is symmetric only one off diagonal array is returned.
      Specified by:
      getDiagonal in interface TridiagonalSimilarDecomposition_F64<ZMatrixRMaj>
      diag - Diagonal elements. Modified.
      off - off diagonal elements. Modified.
    • getT

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

      public ZMatrixRMaj getQ(@Nullable @Nullable ZMatrixRMaj Q, boolean transposed)
      An orthogonal matrix that has the following property: T = QHAQ
      Specified by:
      getQ in interface TridiagonalSimilarDecomposition<ZMatrixRMaj>
      Q - If not null then the results will be stored here. Otherwise a new matrix will be created.
      transposed - If true then the transpose (real) or conjugate transpose (complex) of Q is returned.
      The extracted Q matrix.
    • decompose

      public boolean decompose(ZMatrixRMaj A)
      Decomposes the provided symmetric matrix.
      Specified by:
      decompose in interface DecompositionInterface<ZMatrixRMaj>
      A - Symmetric matrix that is going to be decomposed. Not modified.
      Returns if it was able to decompose the matrix.
    • householderSymmetric

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

      public void init(ZMatrixRMaj A)
      If needed declares and sets up internal data structures.
      A - Matrix being decomposed.
    • inputModified

      public boolean inputModified()
      Description copied from interface: DecompositionInterface
      Checks if the input matrix to DecompositionInterface.decompose( is modified during the decomposition process.
      Specified by:
      inputModified in interface DecompositionInterface<ZMatrixRMaj>
      true if the input matrix to decompose() is modified.
    • getGammas

      public double[] getGammas()