Skip to content

num::unsafe::lanczos

Defined in header <linear/eigen/lanczos.hpp>

lanczos_result lanczos(const mat<real> &A, idx k, real tol = 1e-10, idx max_steps = 0);  // (1)

lanczos_result lanczos(const spmat &A, idx k, real tol = 1e-10, idx max_steps = 0);  // (2)

(1) Lanczos on a stored dense matrix without requiring the symmetry invariant.

The three-term recurrence is derived from \(A = A^T\); without it the basis loses orthogonality and the Ritz values are not eigenvalue estimates.

(2) Lanczos on a stored sparse matrix without requiring the symmetry invariant.