public class SymmetricQREigenHelper_FDRM
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected float[] |
diag |
protected EigenvalueSmall_F32 |
eigenSmall |
protected int |
lastExceptional |
protected int |
N |
protected int |
numExceptional |
protected int |
numSplits |
protected float[] |
off |
protected org.ejml.data.FMatrixRMaj |
Q |
protected java.util.Random |
rand |
protected int[] |
splits |
protected int |
steps |
protected int |
x1 |
protected int |
x2 |
Constructor and Description |
---|
SymmetricQREigenHelper_FDRM() |
Modifier and Type | Method and Description |
---|---|
float |
computeShift() |
float |
computeWilkinsonShift() |
float[] |
copyDiag(float[] ret) |
float[] |
copyEigenvalues(float[] ret) |
float[] |
copyOff(float[] ret) |
protected void |
createBulge(int x1,
float p,
boolean byAngle)
Performs a similar transform on A-pI
|
protected void |
createBulge2by2(int x1,
float p,
boolean byAngle) |
protected void |
eigenvalue2by2(int x1)
Computes the eigenvalue of the 2 by 2 matrix.
|
void |
exceptionalShift()
Perform a shift in a random direction that is of the same magnitude as the elements in the matrix.
|
int |
getMatrixSize() |
void |
incrementSteps() |
void |
init(float[] diag,
float[] off,
int numCols)
Sets up and declares internal data structures.
|
protected boolean |
isZero(int index)
Checks to see if the specified off diagonal element is zero using a relative metric.
|
boolean |
nextSplit()
Tells it to process the submatrix at the next split.
|
protected void |
performImplicitSingleStep(float lambda,
boolean byAngle) |
void |
printMatrix() |
protected void |
removeBulge(int x1) |
protected void |
removeBulgeEnd(int x1)
Rotator to remove the bulge
|
void |
reset(int N)
Sets the size of the matrix being decomposed, declares new memory if needed,
and sets all helper functions to their initial value.
|
void |
resetSteps() |
void |
setQ(org.ejml.data.FMatrixRMaj q) |
void |
setSubmatrix(int x1,
int x2)
Sets which submatrix is being processed.
|
float[] |
swapDiag(float[] diag)
Exchanges the internal array of the diagonal elements for the provided one.
|
float[] |
swapOff(float[] off)
Exchanges the internal array of the off diagonal elements for the provided one.
|
protected void |
updateQ(int m,
int n,
float c,
float s) |
protected java.util.Random rand
protected int steps
protected int numExceptional
protected int lastExceptional
protected EigenvalueSmall_F32 eigenSmall
protected org.ejml.data.FMatrixRMaj Q
protected int N
protected float[] diag
protected float[] off
protected int x1
protected int x2
protected int[] splits
protected int numSplits
public void printMatrix()
public void setQ(org.ejml.data.FMatrixRMaj q)
public void incrementSteps()
public void init(float[] diag, float[] off, int numCols)
diag
- Diagonal elements from tridiagonal matrix. Modified.off
- Off diagonal elements from tridiagonal matrix. Modified.numCols
- number of columns (and rows) in the matrix.public float[] swapDiag(float[] diag)
public float[] swapOff(float[] off)
public void reset(int N)
public float[] copyDiag(float[] ret)
public float[] copyOff(float[] ret)
public float[] copyEigenvalues(float[] ret)
public void setSubmatrix(int x1, int x2)
x1
- Lower bound, inclusive.x2
- Upper bound, inclusive.protected boolean isZero(int index)
protected void performImplicitSingleStep(float lambda, boolean byAngle)
protected void updateQ(int m, int n, float c, float s)
protected void createBulge(int x1, float p, boolean byAngle)
protected void createBulge2by2(int x1, float p, boolean byAngle)
protected void removeBulge(int x1)
protected void removeBulgeEnd(int x1)
protected void eigenvalue2by2(int x1)
public void exceptionalShift()
public boolean nextSplit()
public float computeShift()
public float computeWilkinsonShift()
public int getMatrixSize()
public void resetSteps()