|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ejml.alg.dense.decomposition.eig.symm.SymmetricQREigenHelper
public class SymmetricQREigenHelper
A helper class for the symmetric matrix implicit QR algorithm for eigenvalue decomposition. Performs most of the basic operations needed to extract eigenvalues and eigenvectors.
| Field Summary | |
|---|---|
protected double[] |
diag
|
protected EigenvalueSmall |
eigenSmall
|
protected int |
lastExceptional
|
protected int |
N
|
protected int |
numExceptional
|
protected int |
numSplits
|
protected double[] |
off
|
protected DenseMatrix64F |
Q
|
protected Random |
rand
|
protected int[] |
splits
|
protected int |
steps
|
protected int |
x1
|
protected int |
x2
|
| Constructor Summary | |
|---|---|
SymmetricQREigenHelper()
|
|
| Method Summary | |
|---|---|
double |
computeShift()
|
double |
computeWilkinsonShift()
|
double[] |
copyDiag(double[] ret)
|
double[] |
copyEigenvalues(double[] ret)
|
double[] |
copyOff(double[] ret)
|
protected void |
createBulge(int x1,
double p,
boolean byAngle)
Performs a similar transform on A-pI |
protected void |
createBulge2by2(int x1,
double 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(double[] diag,
double[] 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(double 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(DenseMatrix64F q)
|
void |
setSubmatrix(int x1,
int x2)
Sets which submatrix is being processed. |
double[] |
swapDiag(double[] diag)
Exchanges the internal array of the diagonal elements for the provided one. |
double[] |
swapOff(double[] off)
Exchanges the internal array of the off diagonal elements for the provided one. |
protected void |
updateQ(int m,
int n,
double c,
double s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Random rand
protected int steps
protected int numExceptional
protected int lastExceptional
protected EigenvalueSmall eigenSmall
protected DenseMatrix64F Q
protected int N
protected double[] diag
protected double[] off
protected int x1
protected int x2
protected int[] splits
protected int numSplits
| Constructor Detail |
|---|
public SymmetricQREigenHelper()
| Method Detail |
|---|
public void printMatrix()
public void setQ(DenseMatrix64F q)
public void incrementSteps()
public void init(double[] diag,
double[] 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 double[] swapDiag(double[] diag)
public double[] swapOff(double[] off)
public void reset(int N)
public double[] copyDiag(double[] ret)
public double[] copyOff(double[] ret)
public double[] copyEigenvalues(double[] ret)
public void setSubmatrix(int x1,
int x2)
x1 - Lower bound, inclusive.x2 - Upper bound, inclusive.protected boolean isZero(int index)
protected void performImplicitSingleStep(double lambda,
boolean byAngle)
protected void updateQ(int m,
int n,
double c,
double s)
protected void createBulge(int x1,
double p,
boolean byAngle)
protected void createBulge2by2(int x1,
double 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 double computeShift()
public double computeWilkinsonShift()
public int getMatrixSize()
public void resetSteps()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||