org.ejml.alg.dense.decomposition.hessenberg
Class HessenbergSimilarDecomposition_D64
- java.lang.Object
-
- org.ejml.alg.dense.decomposition.hessenberg.HessenbergSimilarDecomposition_D64
-
- All Implemented Interfaces:
- DecompositionInterface<DenseMatrix64F>
public class HessenbergSimilarDecomposition_D64 extends java.lang.Object implements DecompositionInterface<DenseMatrix64F>
Finds the decomposition of a matrix in the form of:
A = OHOT
where A is an m by m matrix, O is an orthogonal matrix, and H is an upper Hessenberg matrix.A matrix is upper Hessenberg if aij = 0 for all i > j+1. For example, the following matrix is upper Hessenberg.
WRITE IT OUT USING A TABLEThis decomposition is primarily used as a step for computing the eigenvalue decomposition of a matrix. The basic algorithm comes from David S. Watkins, "Fundamentals of MatrixComputations" Second Edition.
-
-
Constructor Summary
Constructors Constructor and Description HessenbergSimilarDecomposition_D64()HessenbergSimilarDecomposition_D64(int initialSize)Creates a decomposition that won't need to allocate new memory if it is passed matrices up to the specified size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleandecompose(DenseMatrix64F A)Computes the decomposition of the provided matrix.double[]getGammas()DenseMatrix64FgetH(DenseMatrix64F H)An upper Hessenberg matrix from the decompostion.DenseMatrix64FgetQ(DenseMatrix64F Q)An orthogonal matrix that has the following property: H = QTAQDenseMatrix64FgetQH()The raw QH matrix that is stored internally.booleaninputModified()Is the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.
-
-
-
Constructor Detail
-
HessenbergSimilarDecomposition_D64
public HessenbergSimilarDecomposition_D64(int initialSize)
Creates a decomposition that won't need to allocate new memory if it is passed matrices up to the specified size.- Parameters:
initialSize- Expected size of the matrices it will decompose.
-
HessenbergSimilarDecomposition_D64
public HessenbergSimilarDecomposition_D64()
-
-
Method Detail
-
decompose
public boolean decompose(DenseMatrix64F A)
Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise.- Specified by:
decomposein interfaceDecompositionInterface<DenseMatrix64F>- Parameters:
A- The matrix that is being decomposed. Not modified.- Returns:
- If it detects any errors or not.
-
inputModified
public boolean inputModified()
Description copied from interface:DecompositionInterfaceIs the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.- Specified by:
inputModifiedin interfaceDecompositionInterface<DenseMatrix64F>- Returns:
- true if the input matrix to decompose() is modified.
-
getQH
public DenseMatrix64F getQH()
The raw QH matrix that is stored internally.- Returns:
- QH matrix.
-
getH
public DenseMatrix64F getH(DenseMatrix64F H)
An upper Hessenberg matrix from the decompostion.- Parameters:
H- If not null then the results will be stored here. Otherwise a new matrix will be created.- Returns:
- The extracted H matrix.
-
getQ
public DenseMatrix64F getQ(DenseMatrix64F Q)
An orthogonal matrix that has the following property: H = QTAQ- Parameters:
Q- If not null then the results will be stored here. Otherwise a new matrix will be created.- Returns:
- The extracted Q matrix.
-
getGammas
public double[] getGammas()
-
-
DMelt 3.0 © DataMelt by jWork.ORG