public abstract class FewEigenvalues extends Eigenvalues
This class use ARPACK to find a few eigenvalues (λ) and corresponding eigenvectors (x) for the standard eigenvalue problem:
Ax = λx
where A
is an n
× n
real
symmetric matrix.
The only thing that must be supplied in order to use this class on your problem is to change the array dimensions appropriately, to specify which eigenvalues you want to compute and to supply a matrix-vector product
w ← Avin the
callback(Vector)
method.
Please refer to the ARPACK guide for further information.
Example:
Matrix A = …square matrix…; Eigenvalues eigen = Eigenvalues.of(A).largest(4); eigen.run(); double[] l = eigen.values; Vector[] x = eigen.vectors;
ddsimp.f
by Richard Lehoucq,
Danny Sorensen, Chao Yang (Fortran)n, nev, value, vector
Constructor and Description |
---|
FewEigenvalues(int n) |
Modifier and Type | Method and Description |
---|---|
protected abstract Vector |
callback(Vector vector) |
FewEigenvalues |
fromBothEnds(int nev0)
Compute eigenvalues from both end of the spectrum.
|
FewEigenvalues |
greatest(int nev0)
Compute the largest eigenvalues in magnitude.
|
FewEigenvalues |
largest(int nev0)
Compute the largest algebraic eigenvalues.
|
FewEigenvalues |
lowest(int nev0)
Compute the smallest eigenvalues in magnitude.
|
static FewEigenvalues |
of(Matrix matrix) |
Eigenvalues |
run()
Runs the eigenvalue decomposition, using an implicitly restarted Arnoldi
process (IRAP).
|
FewEigenvalues |
smallest(int nev0)
Compute the smallest algebraic eigenvalues.
|
getN
public FewEigenvalues(int n)
public static FewEigenvalues of(Matrix matrix)
public FewEigenvalues largest(int nev0)
largest
in class Eigenvalues
public FewEigenvalues smallest(int nev0)
public FewEigenvalues greatest(int nev0)
public FewEigenvalues lowest(int nev0)
public FewEigenvalues fromBothEnds(int nev0)
nev
is odd, compute one more from the high end than from the
low end.public Eigenvalues run()
run
in class Eigenvalues