Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Lanczos

        public Lanczos()
    • 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.