|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEigen
public class Eigen
this class takes in square matrix and computes the eigen values and its corresponding eigen vectors for the matrix
Field Summary | |
---|---|
static double |
EPSILON
|
static double |
INFINITY
|
static int[] |
m_array
|
static int |
MAX_INITIAL_ITER
|
static int |
MAX_ITER
|
static int |
MAX_L_UPDATE
|
static int |
MAXRAND
|
static double |
MIN_DECREASE
|
static double |
MIN_INITIAL_GROWTH
|
static int |
MY_MAXINT
|
static int |
next_i
|
static int |
next_ip
|
static int |
RAND_ARRAY
|
static int |
RAND_BIG
|
static int |
RAND_CONST
|
static int |
rand_init
|
static int |
RAND_INIT
|
static double |
RAND_SCALE
|
static int |
RAND_SEED
|
static int |
temp_init
|
static double |
TINY
|
Constructor Summary | |
---|---|
Eigen()
|
Method Summary | |
---|---|
static void |
balanc(Matrix M)
given a matrix this routine replaces it by a balanced matrix with identical eigenvalues. |
static void |
calcEigVec(Matrix M,
double eigVal,
double[] eigVec)
given a matrix 'M', an Eigenvalue 'eigVal', calculate the the Eigenvector 'eigVec' |
static double[] |
compEigenVal(Matrix T)
this method computes the eigen values of a symmetric matrix |
static void |
copy_FV(double[] src,
double[] dest,
int dim)
this routine copies one vectors contents to another |
static void |
elmhes(Matrix M)
this routine reduces a matrix to hessenberg's form by the elimination method. |
static double |
Euclidian_Distance(double[] S1,
double[] S2,
int dim)
this function computes the euclidean distance between two vwctors |
static void |
hqr(Matrix M,
double[] wr,
double[] wi)
this routine finds all eignvalues of an upper hessenberg matrix. |
static void |
linearSolve(Matrix M,
double eigVal,
double[] y,
double[] x)
this routine uses the ludcmp and lubksb routines to find eigenvectors corresponding to a given eigen value using the inverse iteration method. |
static void |
ludcmp(int n,
int[] indx,
double[][] a,
java.lang.Double d)
given a matrix a[1..n][1..n], this routine replaces it by the LU decomposition of a row wise permutation of itself. |
static double |
myrandom()
this routine uses knuth's subtractive algorithm to generate uniform random numbers in (0, 1) return random number between 0 and 1 |
static void |
norm_vector(double[] V,
int dim)
this routine takes in a vector and normalizes the vector |
static void |
normEigVec(double eigVal,
double[] eigVec)
an Eigenvalue 'eigVal' and the corresponding Eigenvectors this method normalizes the eigen vectors i.e. |
static void |
random_unit_vector(double[] x,
int dim)
this routine generates a random vector of length dim with unit size |
static double[] |
sortEigen(double[] wr)
this method sorts the eigen values in decreasing order of importance |
static double |
vector_len(double[] V,
int dim)
this routine returns the length of the vector |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAXRAND
public static final double INFINITY
public static final double MIN_INITIAL_GROWTH
public static final int MAX_INITIAL_ITER
public static final double EPSILON
public static final int MAX_ITER
public static final int MAX_L_UPDATE
public static final double MIN_DECREASE
public static final double TINY
public static final int MY_MAXINT
public static final int RAND_INIT
public static final int RAND_BIG
public static final int RAND_SEED
public static final int RAND_ARRAY
public static final int RAND_CONST
public static final double RAND_SCALE
public static int rand_init
public static int temp_init
public static int[] m_array
public static int next_i
public static int next_ip
Constructor Detail |
---|
public Eigen()
Method Detail |
---|
public static void ludcmp(int n, int[] indx, double[][] a, java.lang.Double d)
n
- dimensions of the input square matrixindx
- row permutations effected by partial pivotinga
- input matrixd
- +/- 1, if row interchanges was even or
odd respectivelypublic static void linearSolve(Matrix M, double eigVal, double[] y, double[] x)
M
- input matrixeigVal
- eigen valuey
- random vectorx
- random vectorpublic static void normEigVec(double eigVal, double[] eigVec)
eigVal
- eigen valueeigVec
- eigen vectorspublic static void calcEigVec(Matrix M, double eigVal, double[] eigVec)
M
- input matrixeigVal
- eigen valueeigVec
- eigen vectorspublic static void random_unit_vector(double[] x, int dim)
x
- input vectordim
- vector dimensionpublic static double myrandom()
public static void norm_vector(double[] V, int dim)
V
- input vectordim
- vector dimensionpublic static double vector_len(double[] V, int dim)
V
- input vectordim
- vector dimensionpublic static void copy_FV(double[] src, double[] dest, int dim)
src
- source vectordest
- destination vectordim
- vector dimensionpublic static double Euclidian_Distance(double[] S1, double[] S2, int dim)
S1
- first vectorS2
- second vectordim
- vector dimension
public static void hqr(Matrix M, double[] wr, double[] wi)
M
- input matrixwr
- real part of the eigen vectorswi
- immaginary part of the eigen vectorspublic static void elmhes(Matrix M)
M
- input matrixpublic static void balanc(Matrix M)
M
- input matrixpublic static double[] compEigenVal(Matrix T)
T
- input matrix
public static double[] sortEigen(double[] wr)
wr
- real eigen values
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |