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) Compute extreme eigenpairs of a dense matrix by Lanczos, without checking symmetry: \(A v \approx \lambda v\).

(2) Compute extreme eigenpairs of a sparse matrix by Lanczos, without checking symmetry: \(A v \approx \lambda v\).

Warning

On an asymmetric matrix the basis loses orthogonality, and the Ritz values are not eigenvalue estimates.

Warning

On an asymmetric matrix the basis loses orthogonality, and the Ritz values are not eigenvalue estimates.