Skip to main content

eigsh_shift_invert

Function eigsh_shift_invert 

Source
pub fn eigsh_shift_invert(
    a: &CsrMatrix,
    k: usize,
    sigma: f64,
    tol: f64,
) -> Result<EigenPairs>
Expand description

The k eigenvalues of a symmetric sparse matrix nearest σ, with eigenvectors (SciPy’s eigsh(A, k, sigma=σ), shift-invert mode). The eigenvalues λ of A near σ are the largest in magnitude of (A − σI)⁻¹, θ = 1/(λ − σ), which Lanczos finds quickly; each product with the inverse is one solve with a sparse LU factorisation of A − σI.