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

java.lang.Object
  extended by org.ejml.alg.block.decomposition.hessenberg.TridiagonalBlockHelper

public class TridiagonalBlockHelper
extends Object

Author:
Peter Abeles

Constructor Summary
TridiagonalBlockHelper()
           
 
Method Summary
static void applyReflectorsToRow(int blockLength, D1Submatrix64F A, D1Submatrix64F V, int row)
           Applies the reflectors that have been computed previously to the specified row.
static void computeRowOfV(int blockLength, D1Submatrix64F A, D1Submatrix64F V, int row, double gamma)
           Final computation for a single row of 'v':

v = y -(1/2)γ(y^T*u)*u
static void computeV_blockVector(int blockLength, D1Submatrix64F A, double[] gammas, D1Submatrix64F V)
           Given an already computed tridiagonal decomposition, compute the V row block vector.

y(:) = A*u
v(i) = y - (1/2)*γ*(y^T*u)*u
static void computeW_row(int blockLength, D1Submatrix64F Y, D1Submatrix64F W, double[] beta, int betaIndex)
           Computes W from the householder reflectors stored in the columns of the row block submatrix Y.
static void computeY(int blockLength, D1Submatrix64F A, D1Submatrix64F V, int row, double gamma)
           Computes the 'y' vector and stores the result in 'v'

y = -γ(A + U*V^T + V*U^T)u
static double innerProdRowSymm(int blockLength, D1Submatrix64F A, int rowA, D1Submatrix64F B, int rowB, int zeroOffset)
           
static void multA_u(int blockLength, D1Submatrix64F A, D1Submatrix64F V, int row)
           Multiples the appropriate submatrix of A by the specified reflector and stores the result ('y') in V.

y = A*u
static void tridiagUpperRow(int blockLength, D1Submatrix64F A, double[] gammas, D1Submatrix64F V)
           Performs a tridiagonal decomposition on the upper row only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TridiagonalBlockHelper

public TridiagonalBlockHelper()
Method Detail

tridiagUpperRow

public static void tridiagUpperRow(int blockLength,
                                   D1Submatrix64F A,
                                   double[] gammas,
                                   D1Submatrix64F V)

Performs a tridiagonal decomposition on the upper row only.

For each row 'a' in 'A': Compute 'u' the householder reflector. y(:) = A*u v(i) = y - (1/2)*(y^T*u)*u a(i+1) = a(i) - u*γ*v^T - v*u^t

Parameters:
blockLength - Size of a block
A - is the row block being decomposed. Modified.
gammas - Householder gammas.
V - Where computed 'v' are stored in a row block. Modified.

computeW_row

public static void computeW_row(int blockLength,
                                D1Submatrix64F Y,
                                D1Submatrix64F W,
                                double[] beta,
                                int betaIndex)

Computes W from the householder reflectors stored in the columns of the row block submatrix Y.

Y = v(1)
W = -β1v(1)
for j=2:r
  z = -β(I +WYT)v(j)
  W = [W z]
  Y = [Y v(j)]
end

where v(.) are the house holder vectors, and r is the block length. Note that Y already contains the householder vectors so it does not need to be modified.

Y and W are assumed to have the same number of rows and columns.


computeV_blockVector

public static void computeV_blockVector(int blockLength,
                                        D1Submatrix64F A,
                                        double[] gammas,
                                        D1Submatrix64F V)

Given an already computed tridiagonal decomposition, compute the V row block vector.

y(:) = A*u
v(i) = y - (1/2)*γ*(y^T*u)*u


applyReflectorsToRow

public static void applyReflectorsToRow(int blockLength,
                                        D1Submatrix64F A,
                                        D1Submatrix64F V,
                                        int row)

Applies the reflectors that have been computed previously to the specified row.
A = A + u*v^T + v*u^T only along the specified row in A.

Parameters:
blockLength -
A - Contains the reflectors and the row being updated.
V - Contains previously computed 'v' vectors.
row - The row of 'A' that is to be updated.

computeY

public static void computeY(int blockLength,
                            D1Submatrix64F A,
                            D1Submatrix64F V,
                            int row,
                            double gamma)

Computes the 'y' vector and stores the result in 'v'

y = -γ(A + U*V^T + V*U^T)u

Parameters:
blockLength -
A - Contains the reflectors and the row being updated.
V - Contains previously computed 'v' vectors.
row - The row of 'A' that is to be updated.

multA_u

public static void multA_u(int blockLength,
                           D1Submatrix64F A,
                           D1Submatrix64F V,
                           int row)

Multiples the appropriate submatrix of A by the specified reflector and stores the result ('y') in V.

y = A*u

Parameters:
blockLength -
A - Contains the 'A' matrix and 'u' vector.
V - Where resulting 'y' row vectors are stored.
row - row in matrix 'A' that 'u' vector and the row in 'V' that 'y' is stored in.

innerProdRowSymm

public static double innerProdRowSymm(int blockLength,
                                      D1Submatrix64F A,
                                      int rowA,
                                      D1Submatrix64F B,
                                      int rowB,
                                      int zeroOffset)

computeRowOfV

public static void computeRowOfV(int blockLength,
                                 D1Submatrix64F A,
                                 D1Submatrix64F V,
                                 int row,
                                 double gamma)

Final computation for a single row of 'v':

v = y -(1/2)γ(y^T*u)*u

Parameters:
blockLength -
A -
V -
row -
gamma -


Copyright © 2012. All Rights Reserved.