Class Lanczos

java.lang.Object
smile.math.matrix.Lanczos

public class Lanczos extends 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.

  • Constructor Details

    • Lanczos

      public Lanczos()
  • Method Details

    • eigen

      public static Matrix.EVD eigen(IMatrix 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.
      Returns:
      eigen value decomposition.
    • eigen

      public static Matrix.EVD eigen(IMatrix 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.
      Returns:
      eigen value decomposition.