bijnum
Class BIJJacobi

java.lang.Object
  extended by bijnum.BIJJacobi

public class BIJJacobi
extends java.lang.Object

This class implements the jacobi function as a Java class. Redesigned to be faster, for float. Internal calculations are still double though. From Press et al., 2nd ed., Numerical Solutions in C.

See Also:
for the original sources which I kept to be sure because they worked. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.

Field Summary
 float[][] a
          The matrix of which you want to compute E.
 float[] eigenvalues
           
 float[][] eigenvectors
           
 
Constructor Summary
BIJJacobi(float[][] m)
          Create new instance to compute eigenvectors, eigenvalues.
BIJJacobi(float[][] m, boolean doFeedback)
          Create new instance to compute eigenvectors, eigenvalues.
 
Method Summary
 void compute()
          Compute all eigenvalues and eigenvectors of a real symmetric matrix a[N][N].
 int nrot()
           
 void sort()
          Sort the eigenvalues/eigenvectors on the basis of the eigenvalues, largest first.
 int sweeps()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

a

public float[][] a
The matrix of which you want to compute E.


eigenvectors

public float[][] eigenvectors

eigenvalues

public float[] eigenvalues
Constructor Detail

BIJJacobi

public BIJJacobi(float[][] m,
                 boolean doFeedback)
Create new instance to compute eigenvectors, eigenvalues.

Parameters:
m - a real, symmetric matrix of nxn.
doFeedback, - whether a progress routine should be called after each sweep (only for user interaction).

BIJJacobi

public BIJJacobi(float[][] m)
Create new instance to compute eigenvectors, eigenvalues.

Parameters:
m - a real symmetric matrix of NxN.
Method Detail

compute

public void compute()
Compute all eigenvalues and eigenvectors of a real symmetric matrix a[N][N]. Will destroy a!. The eigenvalues/eigenvectors can be obtained from the corresponding public variables. From: Press et al., Numerical Recipes in C, 2nd ed., pp 467-


sort

public void sort()
Sort the eigenvalues/eigenvectors on the basis of the eigenvalues, largest first. Straight insertion method.


nrot

public int nrot()

sweeps

public int sweeps()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object