public class SymEigen extends Object
TRED2.
See Smith et al. (1976) for the EISPACK routines. Further details, some timing
data, and credits are given in Hanson et al. (1990).
Let M = the number of eigenvalues,
= the array of eigenvalues, and
is the associated eigenvector with jth eigenvalue.
Also, let
be the machine precision. The
performance index,
, is defined to be
![]()
While the exact value of
is highly machine
dependent, the performance of SymEigen is considered excellent if
, good if
, and
poor if
. The performance index was first
developed by the EISPACK project at Argonne National Laboratory; see Smith
et al. (1976, pages 124-125).
| Constructor and Description |
|---|
SymEigen(double[][] a)
Constructs the eigenvalues and the eigenvectors
for a real symmetric matrix.
|
SymEigen(double[][] a,
boolean computeVectors)
Constructs the eigenvalues and (optionally) the eigenvectors
for a real symmetric matrix.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getValues()
Returns the eigenvalues
|
double[][] |
getVectors()
Return the eigenvectors of a symmetric matrix of type
double. |
double |
performanceIndex(double[][] a)
Returns the performance index of a real symmetric eigensystem.
|
public SymEigen(double[][] a)
a - is the symmetric matrix whose eigensystem is to be constructed.public SymEigen(double[][] a,
boolean computeVectors)
a - a double symmetric matrix whose eigensystem
is to be constructedcomputeVectors - a boolean, true if the eigenvectors
are to be computedIllegalArgumentException - is thrown when
the lengths of the rows of the input matrix are not uniform.public double[] getValues()
double array containing the eigenvalues in descending order.
If the algorithm fails to converge on an eigenvalue,
that eigenvalue is set to NaN.public double[][] getVectors()
double.double array containing the eigenvectors. The j-th column
of the eigenvector matrix corresponds to the j-th eigenvalue.
The eigenvectors are normalized to have Euclidean length one.
If the eigenvectors were not computed by the constructor,
then null is returned.public double performanceIndex(double[][] a)
a - a double symmetric matrixdouble scalar value indicating how well
the algorithms which have computed the eigenvalue and
eigenvector pairs have performed. A performance index
less than 1 is considered excellent, 1 to 100 is good,
while greater than 100 is considered poor.IllegalArgumentException - is thrown when
the lengths of the rows of the input matrix are not uniform.Copyright © 1970-2015 Rogue Wave Software
Built June 18 2015.