Class TridiagonalDecompositionHouseholder_FDRM
- java.lang.Object
-
- org.ejml.dense.row.decomposition.hessenberg.TridiagonalDecompositionHouseholder_FDRM
-
- All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>,org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.FMatrixRMaj>,org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F32<org.ejml.data.FMatrixRMaj>
public class TridiagonalDecompositionHouseholder_FDRM extends java.lang.Object implements org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F32<org.ejml.data.FMatrixRMaj>Performs a
similar tridiagonal decompositionon a square symmetric input 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*OT
where A is a symmetric m by m matrix, O is an orthogonal matrix, and T is a tridiagonal matrix.This implementation is based off of the algorithm described in:
David S. Watkins, "Fundamentals of Matrix Computations," Second Edition. Page 349-355
-
-
Constructor Summary
Constructors Constructor Description TridiagonalDecompositionHouseholder_FDRM()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandecompose(org.ejml.data.FMatrixRMaj A)Decomposes the provided symmetric matrix.voidgetDiagonal(float[] diag, float[] off)org.ejml.data.FMatrixRMajgetQ(org.ejml.data.FMatrixRMaj Q, boolean transposed)An orthogonal matrix that has the following property: T = QTAQorg.ejml.data.FMatrixRMajgetQT()Returns the internal matrix where the decomposed results are stored.org.ejml.data.FMatrixRMajgetT(org.ejml.data.FMatrixRMaj T)Extracts the tridiagonal matrix found in the decomposition.voidhouseholderSymmetric(int row, float gamma)Performs the householder operations on left and right and side of the matrix.voidinit(org.ejml.data.FMatrixRMaj A)If needed declares and sets up internal data structures.booleaninputModified()
-
-
-
Method Detail
-
getQT
public org.ejml.data.FMatrixRMaj getQT()
Returns the internal matrix where the decomposed results are stored.- Returns:
-
getDiagonal
public void getDiagonal(float[] diag, float[] off)- Specified by:
getDiagonalin interfaceorg.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F32<org.ejml.data.FMatrixRMaj>
-
getT
public org.ejml.data.FMatrixRMaj getT(org.ejml.data.FMatrixRMaj T)
Extracts the tridiagonal matrix found in the decomposition.- Specified by:
getTin interfaceorg.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.FMatrixRMaj>- 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
public org.ejml.data.FMatrixRMaj getQ(org.ejml.data.FMatrixRMaj Q, boolean transposed)An orthogonal matrix that has the following property: T = QTAQ- Specified by:
getQin interfaceorg.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.FMatrixRMaj>- Parameters:
Q- If not null then the results will be stored here. Otherwise a new matrix will be created.- Returns:
- The extracted Q matrix.
-
decompose
public boolean decompose(org.ejml.data.FMatrixRMaj A)
Decomposes the provided symmetric matrix.- Specified by:
decomposein interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>- Parameters:
A- Symmetric matrix that is going to be decomposed. Not modified.
-
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
public void init(org.ejml.data.FMatrixRMaj A)
If needed declares and sets up internal data structures.- Parameters:
A- Matrix being decomposed.
-
inputModified
public boolean inputModified()
- Specified by:
inputModifiedin interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
-
-