mikera.matrixx.decompose.impl.hessenberg
Class TridiagonalDecompositionHouseholder
- java.lang.Object
-
- mikera.matrixx.decompose.impl.hessenberg.TridiagonalDecompositionHouseholder
-
public class TridiagonalDecompositionHouseholder extends java.lang.ObjectPerforms a TridiagonalSimilarDecomposition 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
-
-
Constructor Summary
Constructors Constructor and Description TridiagonalDecompositionHouseholder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleandecompose(AMatrix A)Decomposes the provided symmetric matrix.voidgetDiagonal(double[] diag, double[] off)AMatrixgetQ(boolean transposed)An orthogonal matrix that has the following property: T = QTAQAMatrixgetQT()Returns the internal matrix where the decomposed results are stored.AMatrixgetT()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(AMatrix A)If needed declares and sets up internal data structures.
-
-
-
Method Detail
-
getQT
public AMatrix getQT()
Returns the internal matrix where the decomposed results are stored.- Returns:
-
getDiagonal
public void getDiagonal(double[] diag, double[] off)
-
getT
public AMatrix getT()
Extracts the tridiagonal matrix found in the decomposition.- Returns:
- The extracted T matrix.
-
getQ
public AMatrix getQ(boolean transposed)
An orthogonal matrix that has the following property: T = QTAQ- Returns:
- The extracted Q matrix.
-
decompose
public boolean decompose(AMatrix A)
Decomposes the provided symmetric matrix.- 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(AMatrix A)
If needed declares and sets up internal data structures.- Parameters:
A- Matrix being decomposed.
-
-
DMelt 3.0 © DataMelt by jWork.ORG