Mirrors RSpectra::eigs(). which uses ARPACK codes ("LM", "SM",
"LR", "SR", "LI", "SI"). Unlike ARPACK, "LI"/"SI" rank by the
signed imaginary part (see largest_imaginary()), not by its magnitude. A
non-NULL real sigma with which = "LM" requests the eigenvalues
nearest sigma, computed by shift-invert Krylov-Schur Arnoldi on a
factorised A - sigma I (dense QR or sparse LU).
Usage
eigs(
A,
k,
which = "LM",
sigma = NULL,
opts = list(),
...,
n = NULL,
args = NULL,
left = FALSE
)Arguments
- A
Matrix, eigencore operator, or a function
f(x, args)returningA %*% x(thennis required).- k
Number of eigenpairs to compute.
- which
RSpectra-style target selector.
- sigma
Optional real shift; eigenvalues nearest
sigmaare returned.- opts
RSpectra options list.
tol,ncv(Krylov subspace size, passed asauto(max_subspace = ncv)so the planner still chooses the route),maxitr(passed as the iteration limitmaxit) andretvecare honoured; other keys raise a warning.- ...
Additional arguments passed to
eig_partial().- n
Dimension of the operator when
Ais a function.- args
Extra argument passed to a function
A.- left
Whether to compute and certify left eigenvectors (
left_vectors = "auto"ineig_partial()).FALSE(default) skips the adjoint solve and its certificate entirely.
Value
A list compatible with RSpectra::eigs(), including values,
vectors, convergence counts, operation counts, certificate diagnostics,
and, with left = TRUE, left_vectors, right_vectors,
left_certificate and biorthogonality.
Details
Like RSpectra::eigs(), only right eigenvectors are computed by default;
left = TRUE also computes and certifies left eigenvectors and their
biorthogonality with the right ones (the eig_partial() default).