public class Eigen
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
private int n
private double[] d
private double[] e
private double[][] V
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)