Back to Eigenvalue Solvers (ARPACK)

ar.core.eigsh

Compute eigenvalues and eigenvectors of a sparse matrix.

Syntax

ar.core.eigsh(matvec, n, nev, options?)

Description

Compute eigenvalues and eigenvectors of a sparse matrix. This is the unified API that dispatches to the appropriate solver: - 'symmetric' (default): Uses Lanczos method (more efficient for symmetric matrices) - 'nonsymmetric': Uses Arnoldi method (handles non-symmetric matrices, complex eigenvalues)

Parameters

NameDescription
matvec- Function computing y = A*x
n- Dimension of the matrix (A is n×n)
nev- Number of eigenvalues to compute
options(optional)- Solver options including problem type

Returns

Promise<EigsResult | EignResult>