Class TridiagonalDecompositionHouseholder_CDRM
java.lang.Object
org.ejml.dense.row.decompose.hessenberg.TridiagonalDecompositionHouseholder_CDRM
- All Implemented Interfaces:
DecompositionInterface<CMatrixRMaj>
,TridiagonalSimilarDecomposition<CMatrixRMaj>
,TridiagonalSimilarDecomposition_F32<CMatrixRMaj>
@Generated("org.ejml.dense.row.decompose.hessenberg.TridiagonalDecompositionHouseholder_ZDRM")
public class TridiagonalDecompositionHouseholder_CDRM
extends Object
implements TridiagonalSimilarDecomposition_F32<CMatrixRMaj>
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Decomposes the provided symmetric matrix.void
getDiagonal
(float[] diag, float[] off) Extracts the diagonal and off diagonal elements of the decomposed tridiagonal matrix.float[]
getQ
(@Nullable CMatrixRMaj Q, boolean transposed) An orthogonal matrix that has the following property: T = QHAQgetQT()
Returns the internal matrix where the decomposed results are stored.getT
(@Nullable CMatrixRMaj T) Extracts the tridiagonal matrix found in the decomposition.void
householderSymmetric
(int row, float gamma) Performs the householder operations on left and right and side of the matrix.void
init
(CMatrixRMaj A) If needed declares and sets up internal data structures.boolean
Checks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)
is modified during the decomposition process.
-
Constructor Details
-
TridiagonalDecompositionHouseholder_CDRM
public TridiagonalDecompositionHouseholder_CDRM()
-
-
Method Details
-
getQT
Returns the internal matrix where the decomposed results are stored. -
getDiagonal
public void getDiagonal(float[] diag, float[] off) Description copied from interface:TridiagonalSimilarDecomposition_F32
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 interfaceTridiagonalSimilarDecomposition_F32<CMatrixRMaj>
- Parameters:
diag
- Diagonal elements. Modified.off
- off diagonal elements. Modified.
-
getT
Extracts the tridiagonal matrix found in the decomposition.- Specified by:
getT
in interfaceTridiagonalSimilarDecomposition<CMatrixRMaj>
- Parameters:
T
- If not null then the results will be stored here. Otherwise a new matrix will be created.- Returns:
- The extracted T matrix.
-
getQ
An orthogonal matrix that has the following property: T = QHAQ- Specified by:
getQ
in interfaceTridiagonalSimilarDecomposition<CMatrixRMaj>
- Parameters:
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.- Returns:
- The extracted Q matrix.
-
decompose
Decomposes the provided symmetric matrix.- Specified by:
decompose
in interfaceDecompositionInterface<CMatrixRMaj>
- Parameters:
A
- Symmetric matrix that is going to be decomposed. Not modified.- Returns:
- Returns if it was able to decompose the matrix.
-
householderSymmetric
public void householderSymmetric(int row, float gamma) Performs the householder operations on left and right and side of the matrix. QTAQ- Parameters:
row
- Specifies the submatrix.gamma
- The gamma for the householder operation
-
init
If needed declares and sets up internal data structures.- Parameters:
A
- Matrix being decomposed.
-
inputModified
public boolean inputModified()Description copied from interface:DecompositionInterface
Checks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)
is modified during the decomposition process.- Specified by:
inputModified
in interfaceDecompositionInterface<CMatrixRMaj>
- Returns:
- true if the input matrix to decompose() is modified.
-
getGammas
public float[] getGammas()
-