|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfhm.edu.fem.calc.objects.algorithm.RayleighS
public class RayleighS
Class Description: This class offers methods to calculate Eigenvalues and Eigenvectors via the Rayleigh-S Algorithm. The algorithms used in this class are Copyright by Ewe Leonties taken from the C-Classes he wrote as diploma thesis. The conversion to Java and the percentage displays have been done by the authors mentioned below.
Field Summary | |
---|---|
protected Vector |
eigenvalueVector
|
protected static Logger |
localLogger
|
protected double[][] |
X
|
Constructor Summary | |
---|---|
RayleighS()
Constructor |
Method Summary | |
---|---|
protected void |
abxvavb(int pof,
int p,
int n,
double[] A,
double[] B,
int[] D,
double[][] X,
double[][] VA,
double[][] VB)
Builds the matrix product A*X=VA and B*X=VB |
protected void |
aschlange(int pof,
int p,
int n,
double[] A,
int[] D,
double[][] X,
double[][] S,
double[][] AS)
Calculates the projection matrix AS = XT*A*X |
protected void |
bog(int k,
int n,
double[] H,
double[][] X,
double[][] VB)
b-orthogonalization of h in relation to the k-first vectors in matrix X |
protected void |
borthonormx(int p,
int n,
double[][] X,
double[][] VA,
double[][] VB)
b-orthonomizes the matrix X and leads the matrices VA and VB to |
protected int |
cholesky(int n,
double[] A,
int[] D)
Calculate the Cholesky (by Ewe Leonties) A is changed in the progress containing the result |
boolean |
compute(int n,
double[] A,
double[] B,
int[] D,
int p,
double spv,
double tol,
int maxit)
Preconditioned simultane Rayleigh-Quotient-Minimization via the konjugated gradients of the general EWA A*x=lambda*B*x |
Vector |
getEigenvalueVector()
Grab the vector holding the calculated eigenvalues (you need to call compute()) first |
double[][] |
getEigenvectorArray()
Grab the double array holding the calculated eigenvectors (you need to call compute()) first |
protected void |
initx(int p,
int n,
double[][] X)
Init the Matrix X with random numbers 0 <= xij <= 1 |
protected void |
jacobi(int n,
double gen,
double[][] A,
double[][] V,
int ord)
Calculates the Eigenvalues and Eigenvectors of the symmetric Matrix A |
protected void |
ritzmat(int pof,
int p,
int n,
double[][] X,
double[][] U)
Calculates the matrix product Y = X*U |
protected void |
sqny(int pof,
int p,
int n,
double[][] VA,
double[][] X,
double[][] S,
double[] NY,
double[] Q)
Reserves rayleigh's quotients and helpvector Initializes matrix in downward-direction |
protected void |
vrenv(int n,
double[] L,
int[] D,
double[] B,
double[] X)
Solves L * LT * x = b via "Vorwaerts- und Rueckwaertseinsetzen" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector eigenvalueVector
protected static Logger localLogger
protected double[][] X
Constructor Detail |
---|
public RayleighS()
Method Detail |
---|
protected void abxvavb(int pof, int p, int n, double[] A, double[] B, int[] D, double[][] X, double[][] VA, double[][] VB)
pof,
- offset in matrix Xp,
- columns in matrix Xn,
- size of matrix A and BA,
- matrix A in HullMatrix styleB,
- matrix B in HullMatrix styleD,
- the diagonal pointer vectorX,
- iteration matrixVA,
- RETURN VALUEVB,
- RETURN VALUEprotected void aschlange(int pof, int p, int n, double[] A, int[] D, double[][] X, double[][] S, double[][] AS)
pof,
- offset in matrix Xp,
- amount of columns in Xn,
- size of matrix AA,
- matrix A in HullMatrix styleD,
- diagonal pointer vectorX,
- iterations vector matrixS,
- helper matrixAS,
- RETURN VALUEprotected void bog(int k, int n, double[] H, double[][] X, double[][] VB)
k,
- column indexn,
- dimension of vector HH,
- vector (is changed in the progress and used as RETURN VALUE)X,
- matrix of iterationvectorsVB,
- Matrix of the product VB = B * Xprotected void borthonormx(int p, int n, double[][] X, double[][] VA, double[][] VB)
p,
- dimension of matrices X, VA and VBn,
- dimension of matrices X, VA and VBX,
- RETURN VALUEVA,
- RETURN VALUEVB,
- RETURN VALUEprotected int cholesky(int n, double[] A, int[] D)
n,
- size of Matrix AA,
- Matrix A in HullMatrix styleD,
- diagonal pointer vector
public boolean compute(int n, double[] A, double[] B, int[] D, int p, double spv, double tol, int maxit)
n,
- the size of the matrix A and BA,
- matrix B in HullMatrix styleB,
- matrix B in HullMatrix styleD,
- the diagonal pointer vector (same for both A and B)spv,
- the "Spektralverschiebung"tol,
- the calculation precisionmaxit,
- the maximum number of steps
public Vector getEigenvalueVector()
public double[][] getEigenvectorArray()
protected void initx(int p, int n, double[][] X)
p,
- the dimension of Xn,
- the dimension of XX,
- RETURN VALUE, linear independent start vectorsprotected void jacobi(int n, double gen, double[][] A, double[][] V, int ord)
n,
- size of Matrix Agen,
- machine precisionA,
- double[][] array of Matrix AV,
- RETURN VALUE, matrix of eigenvectorsord,
- if >0 the eigenvalues and associated eigenvectors are sorted from upwards, else downwardsprotected void ritzmat(int pof, int p, int n, double[][] X, double[][] U)
pof,
- offset in matrix xp,
- size of matrix Un,
- amount of rows in XX,
- RETURN VALUE, Y instead of XU,
- the matrix Uprotected void sqny(int pof, int p, int n, double[][] VA, double[][] X, double[][] S, double[] NY, double[] Q)
pof,
- offset in matrix X and Sp,
- dimension of matrices VA, X and Sn,
- dimension of matrices VA, X and SVA
- X
- S,
- RETURN VALUENY,
- RETURN VALUEQ,
- RETURN VALUE, Quotientvectorprotected void vrenv(int n, double[] L, int[] D, double[] B, double[] X)
n,
- size of matrix LL,
- matrix L in HullMatrix styleD,
- diagonal pointer vectorB,
- constant vectorX,
- RETUrN VALUE
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |