public class TridiagonalHelper_FDRB
extends java.lang.Object
Constructor and Description |
---|
TridiagonalHelper_FDRB() |
Modifier and Type | Method and Description |
---|---|
static void |
applyReflectorsToRow(int blockLength,
org.ejml.data.FSubmatrixD1 A,
org.ejml.data.FSubmatrixD1 V,
int row)
Applies the reflectors that have been computed previously to the specified row.
|
static void |
computeRowOfV(int blockLength,
org.ejml.data.FSubmatrixD1 A,
org.ejml.data.FSubmatrixD1 V,
int row,
float gamma)
Final computation for a single row of 'v':
v = y -(1/2)γ(y^T*u)*u |
static void |
computeV_blockVector(int blockLength,
org.ejml.data.FSubmatrixD1 A,
float[] gammas,
org.ejml.data.FSubmatrixD1 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,
org.ejml.data.FSubmatrixD1 Y,
org.ejml.data.FSubmatrixD1 W,
float[] beta,
int betaIndex)
Computes W from the householder reflectors stored in the columns of the row block
submatrix Y.
|
static void |
computeY(int blockLength,
org.ejml.data.FSubmatrixD1 A,
org.ejml.data.FSubmatrixD1 V,
int row,
float gamma)
Computes the 'y' vector and stores the result in 'v'
y = -γ(A + U*V^T + V*U^T)u |
static float |
innerProdRowSymm(int blockLength,
org.ejml.data.FSubmatrixD1 A,
int rowA,
org.ejml.data.FSubmatrixD1 B,
int rowB,
int zeroOffset) |
static void |
multA_u(int blockLength,
org.ejml.data.FSubmatrixD1 A,
org.ejml.data.FSubmatrixD1 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,
org.ejml.data.FSubmatrixD1 A,
float[] gammas,
org.ejml.data.FSubmatrixD1 V)
Performs a tridiagonal decomposition on the upper row only.
|
public static void tridiagUpperRow(int blockLength, org.ejml.data.FSubmatrixD1 A, float[] gammas, org.ejml.data.FSubmatrixD1 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
blockLength
- Size of a blockA
- is the row block being decomposed. Modified.gammas
- Householder gammas.V
- Where computed 'v' are stored in a row block. Modified.public static void computeW_row(int blockLength, org.ejml.data.FSubmatrixD1 Y, org.ejml.data.FSubmatrixD1 W, float[] 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.
public static void computeV_blockVector(int blockLength, org.ejml.data.FSubmatrixD1 A, float[] gammas, org.ejml.data.FSubmatrixD1 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
public static void applyReflectorsToRow(int blockLength, org.ejml.data.FSubmatrixD1 A, org.ejml.data.FSubmatrixD1 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.
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.public static void computeY(int blockLength, org.ejml.data.FSubmatrixD1 A, org.ejml.data.FSubmatrixD1 V, int row, float gamma)
Computes the 'y' vector and stores the result in 'v'
y = -γ(A + U*V^T + V*U^T)u
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.public static void multA_u(int blockLength, org.ejml.data.FSubmatrixD1 A, org.ejml.data.FSubmatrixD1 V, int row)
Multiples the appropriate submatrix of A by the specified reflector and stores
the result ('y') in V.
y = A*u
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.public static float innerProdRowSymm(int blockLength, org.ejml.data.FSubmatrixD1 A, int rowA, org.ejml.data.FSubmatrixD1 B, int rowB, int zeroOffset)
public static void computeRowOfV(int blockLength, org.ejml.data.FSubmatrixD1 A, org.ejml.data.FSubmatrixD1 V, int row, float gamma)
Final computation for a single row of 'v':
v = y -(1/2)γ(y^T*u)*u
blockLength
- A
- V
- row
- gamma
-