@PublicationReference(author="Wikipedia", title="Power iteration", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Power_iteration") public class EigenvectorPowerIteration extends AbstractCloneableSerializable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAXIMUM_ITERATIONS
Default maximum iterations for power iteration, 100.
|
static double |
DEFAULT_STOPPING_THRESHOLD
Default stopping threshold for power iteration, 1.0E-5.
|
Constructor and Description |
---|
EigenvectorPowerIteration()
Creates a new instance of EigenvectorPowerIteration.
|
Modifier and Type | Method and Description |
---|---|
static double |
estimateEigenvalue(Matrix A,
Vector v)
Finds the eigenvalue associated with the given Matrix and eigenvector.
|
static Vector |
estimateEigenvector(Vector initial,
Matrix A,
double stoppingThreshold,
int maxIterations)
Estimates the eigenvector corresponding to the largest magnitude
eigenvalue.
|
static java.util.ArrayList<Vector> |
estimateEigenvectors(Matrix A,
int numEigenvectors)
Estimates the top eigenvectors of the given matrix using the power
iteration algorithm.
|
static java.util.ArrayList<Vector> |
estimateEigenvectors(Matrix A,
int numEigenvectors,
double stoppingThreshold,
int maxIterations)
Estimates the top eigenvectors of the given matrix using the power
iteration algorithm.
|
clone
public static final double DEFAULT_STOPPING_THRESHOLD
public static final int DEFAULT_MAXIMUM_ITERATIONS
public EigenvectorPowerIteration()
public static java.util.ArrayList<Vector> estimateEigenvectors(Matrix A, int numEigenvectors)
A
- The matrix to estimate the eigenvectors for. It must be symmetric.
It will be modified by the algorithm.numEigenvectors
- The number of eigenvectors to compute.public static java.util.ArrayList<Vector> estimateEigenvectors(Matrix A, int numEigenvectors, double stoppingThreshold, int maxIterations)
A
- The matrix to estimate the eigenvectors for. It must be symmetric.
It will be modified by the algorithm.numEigenvectors
- The number of eigenvectors to compute.stoppingThreshold
- The stopping threshold for the power iteration algorithm. The
algorithm will stop its computation of an eigenvector when themaxIterations
- The maximum number of iterations for the power iteration algorithm.public static Vector estimateEigenvector(Vector initial, Matrix A, double stoppingThreshold, int maxIterations)
initial
- Initial estimate of the eigenvector. This is generally a uniform
(constant nonzero) Vector.A
- The matrix to estimate the eigenvectors for. It must be symmetric.
It will be modified by the algorithm.stoppingThreshold
- The stopping threshold for the power iteration algorithm. The
algorithm will stop its computation of an eigenvector when themaxIterations
- The maximum number of iterations for the power iteration algorithm.public static double estimateEigenvalue(Matrix A, Vector v)
A
- Matrix to estimate the eigenvalue of. May have negative, repeated,
positive, or zero eigenvaluesv
- Eigenvector associated with the unknown eigenvalue