org.jmol.util

Class Eigen

public class Eigen extends Object

Eigenvalues and eigenvectors of a real 3x3 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. In this implementation, output is as a set of double[3] ROWS

Field Summary
double[]d
double[]e
double[][]Vo
double[][]Vx
Constructor Summary
Eigen(double[][] A)
Method Summary
voiddump()
voiddump(int i)
double[]getEigenvalues()
double[][]getEigenvectors()
static doublehypot(double a, double b)
static float[]toFloat(double[] d)
static float[][]toFloat3x3(double[][] d)
voidtql2()
voidtred2()

Field Detail

d

private double[] d

e

private double[] e

Vo

private double[][] Vo

Vx

private double[][] Vx

Constructor Detail

Eigen

public Eigen(double[][] A)

Method Detail

dump

public void dump()

dump

private void dump(int i)

getEigenvalues

public double[] getEigenvalues()

getEigenvectors

public double[][] getEigenvectors()

hypot

private static double hypot(double a, double b)

toFloat

public static float[] toFloat(double[] d)

toFloat3x3

public static float[][] toFloat3x3(double[][] d)

tql2

private void tql2()

tred2

private void tred2()