Class TridiagonalDecompositionHouseholder_DDRM
java.lang.Object
org.ejml.dense.row.decomposition.hessenberg.TridiagonalDecompositionHouseholder_DDRM
- All Implemented Interfaces:
org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>,org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.DMatrixRMaj>,org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F64<org.ejml.data.DMatrixRMaj>
- Direct Known Subclasses:
TridiagonalDecompositionHouseholder_MT_DDRM
public class TridiagonalDecompositionHouseholder_DDRM
extends java.lang.Object
implements org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F64<org.ejml.data.DMatrixRMaj>
Performs a similar tridiagonal decomposition on 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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TridiagonalDecompositionHouseholder_DDRM() -
Method Summary
Modifier and Type Method Description booleandecompose(org.ejml.data.DMatrixRMaj A)Decomposes the provided symmetric matrix.voidgetDiagonal(double[] diag, double[] off)org.ejml.data.DMatrixRMajgetQ(@Nullable org.ejml.data.DMatrixRMaj Q, boolean transposed)An orthogonal matrix that has the following property: T = QTAQorg.ejml.data.DMatrixRMajgetQT()Returns the internal matrix where the decomposed results are stored.org.ejml.data.DMatrixRMajgetT(@Nullable org.ejml.data.DMatrixRMaj T)Extracts the tridiagonal matrix found in the decomposition.voidhouseholderSymmetric(int row, double gamma)Performs the householder operations on left and right and side of the matrix.voidinit(org.ejml.data.DMatrixRMaj A)If needed declares and sets up internal data structures.booleaninputModified()protected voidrank1UpdateMultL(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1)protected voidrank1UpdateMultR(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1)
-
Field Details
-
Constructor Details
-
TridiagonalDecompositionHouseholder_DDRM
public TridiagonalDecompositionHouseholder_DDRM()
-
-
Method Details
-
getQT
public org.ejml.data.DMatrixRMaj getQT()Returns the internal matrix where the decomposed results are stored. -
getDiagonal
public void getDiagonal(double[] diag, double[] off)- Specified by:
getDiagonalin interfaceorg.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F64<org.ejml.data.DMatrixRMaj>
-
getT
public org.ejml.data.DMatrixRMaj getT(@Nullable @Nullable org.ejml.data.DMatrixRMaj T)Extracts the tridiagonal matrix found in the decomposition.- Specified by:
getTin interfaceorg.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.DMatrixRMaj>- 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.DMatrixRMaj getQ(@Nullable @Nullable org.ejml.data.DMatrixRMaj Q, boolean transposed)An orthogonal matrix that has the following property: T = QTAQ- Specified by:
getQin interfaceorg.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition<org.ejml.data.DMatrixRMaj>- 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.DMatrixRMaj A)Decomposes the provided symmetric matrix.- Specified by:
decomposein interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>- Parameters:
A- Symmetric matrix that is going to be decomposed. Not modified.
-
householderSymmetric
public void householderSymmetric(int row, double 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.DMatrixRMaj A)If needed declares and sets up internal data structures.- Parameters:
A- Matrix being decomposed.
-
rank1UpdateMultL
protected void rank1UpdateMultL(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1) -
rank1UpdateMultR
protected void rank1UpdateMultR(org.ejml.data.DMatrixRMaj A, double gamma, int colA0, int w0, int w1) -
inputModified
public boolean inputModified()- Specified by:
inputModifiedin interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>
-