org.ejml.alg.block.decomposition.hessenberg
Class TridiagonalDecompositionBlockHouseholder

java.lang.Object
  extended by org.ejml.alg.block.decomposition.hessenberg.TridiagonalDecompositionBlockHouseholder
All Implemented Interfaces:
DecompositionInterface<BlockMatrix64F>, TridiagonalSimilarDecomposition<BlockMatrix64F>

public class TridiagonalDecompositionBlockHouseholder
extends Object
implements TridiagonalSimilarDecomposition<BlockMatrix64F>

Tridiagonal similar decomposition for block matrices. Orthogonal matrices are computed using householder vectors.

Based off algorithm in section 2 of J. J. Dongarra, D. C. Sorensen, S. J. Hammarling, "Block Reduction of Matrices to Condensed Forms for Eigenvalue Computations" Journal of Computations and Applied Mathematics 27 (1989) 215-227
Computations of Householder reflectors has been modified from what is presented in that paper to how it is performed in "Fundamentals of Matrix Computations" 2nd ed. by David S. Watkins.

Author:
Peter Abeles

Field Summary
protected  BlockMatrix64F A
           
protected  double[] gammas
           
protected  BlockMatrix64F tmp
           
protected  BlockMatrix64F V
           
protected  DenseMatrix64F zerosM
           
 
Constructor Summary
TridiagonalDecompositionBlockHouseholder()
           
 
Method Summary
 boolean decompose(BlockMatrix64F orig)
          Computes the decomposition of the input matrix.
 void getDiagonal(double[] diag, double[] off)
          Extracts the diagonal and off diagonal elements of the decomposed tridiagonal matrix.
 BlockMatrix64F getQ(BlockMatrix64F Q, boolean transposed)
          An orthogonal matrix that has the following property: T = QTAQ
 BlockMatrix64F getT(BlockMatrix64F T)
          Extracts the tridiagonal matrix found in the decomposition.
 boolean inputModified()
          Is the input matrix to DecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during the decomposition process.
static void multPlusTransA(int blockLength, D1Submatrix64F A, D1Submatrix64F B, D1Submatrix64F C)
          C = C + A^T*B
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A

protected BlockMatrix64F A

V

protected BlockMatrix64F V

tmp

protected BlockMatrix64F tmp

gammas

protected double[] gammas

zerosM

protected DenseMatrix64F zerosM
Constructor Detail

TridiagonalDecompositionBlockHouseholder

public TridiagonalDecompositionBlockHouseholder()
Method Detail

getT

public BlockMatrix64F getT(BlockMatrix64F T)
Description copied from interface: TridiagonalSimilarDecomposition
Extracts the tridiagonal matrix found in the decomposition.

Specified by:
getT in interface TridiagonalSimilarDecomposition<BlockMatrix64F>
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 BlockMatrix64F getQ(BlockMatrix64F Q,
                           boolean transposed)
Description copied from interface: TridiagonalSimilarDecomposition
An orthogonal matrix that has the following property: T = QTAQ

Specified by:
getQ in interface TridiagonalSimilarDecomposition<BlockMatrix64F>
Parameters:
Q - If not null then the results will be stored here. Otherwise a new matrix will be created.
Returns:
The extracted Q matrix.

getDiagonal

public void getDiagonal(double[] diag,
                        double[] off)
Description copied from interface: TridiagonalSimilarDecomposition
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 interface TridiagonalSimilarDecomposition<BlockMatrix64F>
Parameters:
diag - Diagonal elements. Modified.
off - off diagonal elements. Modified.

decompose

public boolean decompose(BlockMatrix64F orig)
Description copied from interface: DecompositionInterface
Computes the decomposition of the input matrix. Depending on the implementation the input matrix might be stored internally or modified. If it is modified then the function DecompositionInterface.inputModified() will return true and the matrix should not be modified until the decomposition is no longer needed.

Specified by:
decompose in interface DecompositionInterface<BlockMatrix64F>
Parameters:
orig - The matrix which is being decomposed. Modification is implementation dependent.
Returns:
Returns if it was able to decompose the matrix.

multPlusTransA

public static void multPlusTransA(int blockLength,
                                  D1Submatrix64F A,
                                  D1Submatrix64F B,
                                  D1Submatrix64F C)
C = C + A^T*B

Parameters:
blockLength -
A - row block vector
B - row block vector
C -

inputModified

public boolean inputModified()
Description copied from interface: DecompositionInterface
Is the input matrix to DecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during the decomposition process.

Specified by:
inputModified in interface DecompositionInterface<BlockMatrix64F>
Returns:
true if the input matrix to decompose() is modified.


Copyright © 2012. All Rights Reserved.