TheAlgorithms / Python

All Algorithms implemented in Python
https://thealgorithms.github.io/Python/
MIT License
194.56k stars 45.66k forks source link

Added the implementation of Lanczos algorithm #12386

Open Nanoemm opened 2 days ago

Nanoemm commented 2 days ago

Describe your change:

Added the implemenation of Lanczos algorithm. The Lanczos algorithm is an iterative method used to compute the eigenvalues and eigenvectors of large, sparse symmetric matrices. It transforms the matrix into a smaller tridiagonal matrix that approximates the original matrix's spectral properties. The algorithm generates an orthogonal basis for the Krylov subspace, which is built from successive matrix-vector multiplications. https://en.wikipedia.org/wiki/Lanczos_algorithm

Checklist: