|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.math.EigenSystem
EigenSystem
defines a system of eigen values and associated
eigen vectors that solves the case AX = (alpha)X where (A - alpha(I)) = 0.
The numerical approach used is to apply orthogonal transformations
(Householder transformations) to reduce A to a tridiagonal matrix. The
QL algorithm than shifts the matrix to a diagonal one.
NOTE: See 3D Game Engine Design. David H. Eberly. Also, JAMA.
Constructor Summary | |
EigenSystem(float[][] matrix)
Constructor instantiates a new EigenSystem object from
a supplied matrix. |
Method Summary | |
void |
decreasingSort()
decreasingSort sorts eigenvalues and their associated
eigenvectors in order of largest to smallest. |
float |
getEigenvector(int row,
int col)
getEigenVector returns a single element of an eigenvector. |
float[][] |
getEigenvectors()
getEigenvectors returns the complete matrix of eigenvectors. |
float[] |
getImaginaryEigenValue()
getImaginaryEigenvalue returns the imaginary components of
the eigenvalues. |
float |
getImaginaryEigenValue(int i)
getImaginaryEigenvalue returns a single eigenvalue defined by
the parameter index. |
float[] |
getRealEigenvalue()
getRealEigenvalue returns the real components of the
eigenvalues. |
float |
getRealEigenvalue(int i)
getRealEigenvalue returns a single eigenvalue defined by
the parameter index. |
void |
increasingSort()
increasingSort sorts eigenvalues and their associated
eigenvectors in order of smallest to largest. |
static void |
main(java.lang.String[] args)
Main method used for testing. |
void |
tridiagonalQL()
tridiagonalQL reduces the tridiagonal matrix to a diagonal
one using the QL algorithm. |
void |
tridiagonalReduction()
tridiagonalReduction reduces the matrix to a tridiagonal
matrix using the Householder transformations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EigenSystem(float[][] matrix)
EigenSystem
object from
a supplied matrix. Where the matrix is A in the equation:
AX = (alpha)X. It is assumed that the supplied matrix is symmetric
and a check for such will occur during instantiation. If the matrix
is not symmetric, the eigenvalues and eigen vectors will not be
calculated.
matrix
- the square matrix to create the eigen system from.Method Detail |
public void decreasingSort()
decreasingSort
sorts eigenvalues and their associated
eigenvectors in order of largest to smallest. Such that
e[0] >= ... >= e[size - 1].
public void increasingSort()
increasingSort
sorts eigenvalues and their associated
eigenvectors in order of smallest to largest. Such that
e[0] <= ... <= e[size - 1].
public void tridiagonalReduction()
tridiagonalReduction
reduces the matrix to a tridiagonal
matrix using the Householder transformations.
public void tridiagonalQL()
tridiagonalQL
reduces the tridiagonal matrix to a diagonal
one using the QL algorithm.
public float getEigenvector(int row, int col)
getEigenVector
returns a single element of an eigenvector.
The element is defined by the row and column requested.
row
- the row of the eigenvectorscol
- the column of the eigenvectors
public float[][] getEigenvectors()
getEigenvectors
returns the complete matrix of eigenvectors.
public float[] getRealEigenvalue()
getRealEigenvalue
returns the real components of the
eigenvalues.
public float getRealEigenvalue(int i)
getRealEigenvalue
returns a single eigenvalue defined by
the parameter index.
i
- the eigenvalue desired.
public float[] getImaginaryEigenValue()
getImaginaryEigenvalue
returns the imaginary components of
the eigenvalues.
public float getImaginaryEigenValue(int i)
getImaginaryEigenvalue
returns a single eigenvalue defined by
the parameter index.
i
- the eigenvalue desired.
public static void main(java.lang.String[] args)
args
- command line arguments.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |