|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jmol.util.Eigen
public class Eigen
Eigenvalues and eigenvectors of a real (n x n) symmetric matrix. adapted by Bob Hanson from http://math.nist.gov/javanumerics/jama/ (public domain)
If A is symmetric, then A = V*D*V' where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal. I.e. A = V.times(D.times(V.transpose())) and V.times(V.transpose()) equals the identity matrix. output is as a set of double[n] columns, but for Jmol we use getEigenvectorsFloatTransformed to return them as a set of rows for easier use as A[0], A[1], etc.
| Field Summary | |
|---|---|
private double[] |
d
Arrays for internal storage of eigenvalues. |
private double[] |
e
Arrays for internal storage of eigenvalues. |
private int |
n
Row and column dimension (square matrix). |
private double[][] |
V
Array for internal storage of eigenvectors. |
| Constructor Summary | |
|---|---|
Eigen(double[][] A)
|
|
Eigen(int n)
|
|
| Method Summary | |
|---|---|
void |
calc(double[][] A)
|
double[] |
getEigenvalues()
|
double[][] |
getEigenvectors()
|
float[][] |
getEigenvectorsFloatTransposed()
transpose V and turn into floats |
private static double |
hypot(double a,
double b)
|
private void |
tql2()
|
private void |
tred2()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int n
private double[] d
private double[] e
private double[][] V
| Constructor Detail |
|---|
public Eigen(int n)
public Eigen(double[][] A)
| Method Detail |
|---|
private void tred2()
private void tql2()
public void calc(double[][] A)
public double[][] getEigenvectors()
public double[] getEigenvalues()
public float[][] getEigenvectorsFloatTransposed()
private static double hypot(double a,
double b)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||