org.ejml.dense.row.decompose.hessenberg

## Class HessenbergSimilarDecomposition_CDRM

• java.lang.Object
• org.ejml.dense.row.decompose.hessenberg.HessenbergSimilarDecomposition_CDRM
• All Implemented Interfaces:
DecompositionInterface<CMatrixRMaj>

```public class HessenbergSimilarDecomposition_CDRM
extends java.lang.Object
implements DecompositionInterface<CMatrixRMaj>```

Complex Hessenberg decomposition. It find matrices O and P such that:

A = OPOH

where A is an m by m matrix, O is an orthogonal matrix, and P 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.

• ### Constructor Summary

Constructors
Constructor and Description
`HessenbergSimilarDecomposition_CDRM()`
`HessenbergSimilarDecomposition_CDRM(int initialSize)`
Creates a decomposition that won't need to allocate new memory if it is passed matrices up to the specified size.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`boolean` `decompose(CMatrixRMaj A)`
Computes the decomposition of the provided matrix.
`float[]` `getGammas()`
`CMatrixRMaj` `getH(CMatrixRMaj H)`
An upper Hessenberg matrix from the decomposition.
`CMatrixRMaj` `getQ(CMatrixRMaj Q)`
An orthogonal matrix that has the following property: H = QTAQ
`CMatrixRMaj` `getQH()`
The raw QH matrix that is stored internally.
`boolean` `inputModified()`
Is the input matrix to `DecompositionInterface.decompose(org.ejml.data.Matrix)` is modified during the decomposition process.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### HessenbergSimilarDecomposition_CDRM

`public HessenbergSimilarDecomposition_CDRM(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_CDRM

`public HessenbergSimilarDecomposition_CDRM()`
• ### Method Detail

• #### decompose

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

`public boolean inputModified()`
Description copied from interface: `DecompositionInterface`
Is the input matrix to `DecompositionInterface.decompose(org.ejml.data.Matrix)` is modified during the decomposition process.
Specified by:
`inputModified` in interface `DecompositionInterface<CMatrixRMaj>`
Returns:
true if the input matrix to decompose() is modified.
• #### getQH

`public CMatrixRMaj getQH()`
The raw QH matrix that is stored internally.
Returns:
QH matrix.
• #### getH

`public CMatrixRMaj getH(CMatrixRMaj 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 CMatrixRMaj getQ(CMatrixRMaj 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.
• #### getGammas

`public float[] getGammas()`