Class ComplexHess
- All Implemented Interfaces:
Decomposition<CMatrix>
- Direct Known Subclasses:
HermHess
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 ]]
-
Field Summary
Fields inherited from class org.flag4j.linalg.decompositions.unitary.ComplexUnitaryDecomposition
currentFactor, norm, normRe
Fields inherited from class org.flag4j.linalg.decompositions.unitary.UnitaryDecomposition
applyUpdate, householderVector, minAxisSize, numCols, numRows, qFactors, storeReflectors, subDiagonal, transformData, transformMatrix, workArray
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a complex Hessenburg decomposer.ComplexHess
(boolean computeQ) Creates a complex Hessenburg decomposer. -
Method Summary
Modifier and TypeMethodDescriptionComputes theQR
decomposition of a real dense matrix.getH()
Gets the upper Hessenburg matrixH
from the Hessenburg decomposition.getUpper()
Gets the upper Hessenburg matrix from the last decomposition.protected CMatrix
initQ()
Creates and initializes Q to the appropriately sized identity matrix.Methods inherited from class org.flag4j.linalg.decompositions.unitary.ComplexUnitaryDecomposition
computeHouseholder, computePhasedNorm, findMaxAndInit, getQ, getUpper, initWorkArrays, updateData
Methods inherited from class org.flag4j.linalg.decompositions.unitary.UnitaryDecomposition
decomposeUnitary, setUp
-
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 tofalse
may yield a slight increase in efficiency.- See Also:
-
-
Method Details
-
decompose
Computes theQR
decomposition of a real dense matrix.- Parameters:
src
- The source matrix to decompose.- Returns:
- A reference to this decomposer.
-
initQ
Creates and initializes Q to the appropriately sized identity matrix.- Specified by:
initQ
in classUnitaryDecomposition<CMatrix,
Complex128[]> - Returns:
- An identity matrix with the appropriate size.
-
getUpper
Gets the upper Hessenburg matrix from the last decomposition. Same asgetH()
- Specified by:
getUpper
in classUnitaryDecomposition<CMatrix,
Complex128[]> - Returns:
- The upper Hessenburg matrix from the last decomposition.
-
getH
Gets the upper Hessenburg matrixH
from the Hessenburg decomposition.- Returns:
- The upper Hessenburg matrix
H
from the Hessenburg decomposition.
-