Class ComplexHess

All Implemented Interfaces:
Decomposition<CMatrix>
Direct Known Subclasses:
HermHess

public class ComplexHess extends ComplexUnitaryDecomposition

Computes the Hessenburg decomposition of a complex dense square matrix. That is, for a square matrix A, computes the decomposition A=QHQH where Q is an unitary matrix and H is a matrix in upper Hessenburg form and is similar to A (i.e. has the same eigenvalues).

A matrix H is in upper Hessenburg form if it is nearly upper triangular. Specifically, if H has all zeros below the first sub-diagonal.

For example, the following matrix is in upper Hessenburg form where each 'x' is a placeholder which may hold a different value:

     [[ x x x x x ]
      [ x x x x x ]
      [ 0 x x x x ]
      [ 0 0 x x x ]
      [ 0 0 0 x x ]]
  • Constructor Details

    • ComplexHess

      public ComplexHess()

      Creates a complex Hessenburg decomposer. This decomposer will compute the Hessenburg decomposition for complex dense matrices.

      By default, the unitary matrix will be computed. To specify if the unitary matrix should be computed, use ComplexHess(boolean).

      See Also:
    • ComplexHess

      public ComplexHess(boolean computeQ)

      Creates a complex Hessenburg decomposer. This decomposer will compute the Hessenburg decomposition for complex dense matrices.

      Parameters:
      computeQ - Flag indicating if the unitary matrix in the Hessenburg decomposition should be computed. If it is not needed, setting this to false may yield a slight increase in efficiency.
      See Also:
  • Method Details

    • decompose

      public ComplexHess decompose(CMatrix src)
      Computes the QR decomposition of a real dense matrix.
      Parameters:
      src - The source matrix to decompose.
      Returns:
      A reference to this decomposer.
    • initQ

      protected CMatrix initQ()
      Creates and initializes Q to the appropriately sized identity matrix.
      Specified by:
      initQ in class UnitaryDecomposition<CMatrix,Complex128[]>
      Returns:
      An identity matrix with the appropriate size.
    • getUpper

      public CMatrix getUpper()
      Gets the upper Hessenburg matrix from the last decomposition. Same as getH()
      Specified by:
      getUpper in class UnitaryDecomposition<CMatrix,Complex128[]>
      Returns:
      The upper Hessenburg matrix from the last decomposition.
    • getH

      public CMatrix getH()
      Gets the upper Hessenburg matrix H from the Hessenburg decomposition.
      Returns:
      The upper Hessenburg matrix H from the Hessenburg decomposition.