Class ComplexHess
java.lang.Object
org.flag4j.linalg.decompositions.unitary.UnitaryDecomposition<CMatrix,CNumber[]>
org.flag4j.linalg.decompositions.unitary.ComplexUnitaryDecomposition
org.flag4j.linalg.decompositions.hess.ComplexHess
- All Implemented Interfaces:
Decomposition<CMatrix>
Computes the Hessenburg decomposition of a complex dense square matrix. That is, for a square matrix
A
, computes the decomposition A=QHQ
H where Q
is an orthogonal matrix and
H
is a matrix in upper Hessenburg form which 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
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
ConstructorDescriptionCreates a Hessenburg decomposer.ComplexHess
(boolean computeQ) Creates a real unitary decomposer which will reduce the matrix to an upper quasi-triangular matrix which is has zeros below the specified sub-diagonal. -
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
decomposeBase, setUp
-
Constructor Details
-
ComplexHess
public ComplexHess()Creates a Hessenburg decomposer. This decomposer will compute the Hessenburg decomposition for complex dense matrices. -
ComplexHess
public ComplexHess(boolean computeQ) Creates a real unitary decomposer which will reduce the matrix to an upper quasi-triangular matrix which is has zeros below the specified sub-diagonal.
-
-
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,
CNumber[]> - Returns:
- An identity matrix with the appropriate size.
-
getUpper
-
getH
Gets the upper Hessenburg matrixH
from the Hessenburg decomposition.- Returns:
- The upper Hessenburg matrix
H
from the Hessenburg decomposition.
-