Package smile.math.matrix
Class Lanczos
- java.lang.Object
-
- smile.math.matrix.Lanczos
-
public class Lanczos extends java.lang.Object
The Lanczos algorithm is a direct algorithm devised by Cornelius Lanczos that is an adaptation of power methods to find the most useful eigenvalues and eigenvectors of an nth order linear system with a limited number of operations, m, where m is much smaller than n.Although computationally efficient in principle, the method as initially formulated was not useful, due to its numerical instability. In this implementation, we use partial reorthogonalization to make the method numerically stable.
- Author:
- Haifeng Li
-
-
Constructor Summary
Constructors Constructor Description Lanczos()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EVD
eigen(Matrix A, int k)
Find k largest approximate eigen pairs of a symmetric matrix by the Lanczos algorithm.static EVD
eigen(Matrix A, int k, double kappa, int maxIter)
Find k largest approximate eigen pairs of a symmetric matrix by the Lanczos algorithm.
-
-
-
Method Detail
-
eigen
public static EVD eigen(Matrix A, int k)
Find k largest approximate eigen pairs of a symmetric matrix by the Lanczos algorithm.- Parameters:
A
- the matrix supporting matrix vector multiplication operation.k
- the number of eigenvalues we wish to compute for the input matrix. This number cannot exceed the size of A.
-
eigen
public static EVD eigen(Matrix A, int k, double kappa, int maxIter)
Find k largest approximate eigen pairs of a symmetric matrix by the Lanczos algorithm.- Parameters:
A
- the matrix supporting matrix vector multiplication operation.k
- the number of eigenvalues we wish to compute for the input matrix. This number cannot exceed the size of A.kappa
- relative accuracy of ritz values acceptable as eigenvalues.maxIter
- Maximum number of iterations.
-
-