fhm.edu.fem.calc.objects.matrix
Class Jacobi

java.lang.Object
  extended by fhm.edu.fem.calc.objects.matrix.Jacobi

public class Jacobi
extends java.lang.Object

Class Description: This class offers methods to calculate Eigenvalues and Eigenvectors via the Jacobi 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.

Author:
Thomas Woellert (thomas@woellert.net), Stefan Weissbach (weissbst@gmx.de)

Field Summary
protected  Vector eigenvalueVector
           
protected static Logger localLogger
           
protected  double[][] V
           
 
Constructor Summary
Jacobi()
          Constructor
 
Method Summary
 boolean compute(int n, double gen, double[][] A, int ord)
          Calculates the Eigenvalues and Eigenvectors of the symmetric Matrix A After completing this calculation you can also grab all calculated Eigenvalues via the associated Getter-Method in this class
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eigenvalueVector

protected Vector eigenvalueVector

localLogger

protected static Logger localLogger

V

protected double[][] V
Constructor Detail

Jacobi

public Jacobi()
Constructor

Method Detail

compute

public boolean compute(int n,
                       double gen,
                       double[][] A,
                       int ord)
Calculates the Eigenvalues and Eigenvectors of the symmetric Matrix A After completing this calculation you can also grab all calculated Eigenvalues via the associated Getter-Method in this class

Parameters:
n, - size of Matrix A
gen, - machine precision
A, - double[][] array of Matrix A
ord, - if >0 the eigenvalues and associated eigenvectors are sorted from upwards, else downwards
Returns:
bool, true if all went well, false otherwise

getEigenvalueVector

public Vector getEigenvalueVector()
Grab the vector holding the calculated eigenvalues (you need to call compute()) first

Returns:
Vector, the vector holding all eigenvalues

getEigenvectorArray

public double[][] getEigenvectorArray()
Grab the double array holding the calculated eigenvectors (you need to call compute()) first

Returns:
double[][], the array holding all eigenvectors