Skip to contents

EigenvalueProblem(A, nev, which, B) asks for nev eigenvalues of A (of the generalized problem A v = lambda B v with B), the ones selected by which (an EigenvalueTarget: "LM" largest magnitude, "SM" smallest magnitude, "LR"/"SR" largest or smallest real part, "LI"/"SI" imaginary part). solve(prob, alg) returns an EigenvalueSolution with values and vectors. DenseEigen() uses LAPACK through eigen(); ArnoldiMethodJL() (also ArnoldiMethod()), ArpackJL(), KrylovKitEigen() and JacobiDavidsonJL() run an Arnoldi iteration with explicit restarts in R for large matrices and the dense method for small ones.

Usage

EigenvalueTarget

EigenvalueProblem(A, nev = 1L, which = EigenvalueTarget$LM, B = NULL, ...)

DenseEigen()

ArnoldiMethodJL(krylovdim = 30L)

ArnoldiMethod(krylovdim = 30L)

ArpackJL(krylovdim = 30L)

KrylovKitEigen(krylovdim = 30L)

JacobiDavidsonJL(krylovdim = 30L)

EigenvalueSolution(
  values,
  vectors = NULL,
  retcode = "Success",
  residuals = NULL
)

Arguments

A, B

Matrices.

nev

Number of eigenvalues.

which

The EigenvalueTarget.

...

Options.

krylovdim

Dimension of the Krylov space of the Arnoldi iteration.

values, vectors, retcode, residuals

Fields of an EigenvalueSolution (residuals: the residual norm of each pair of an Arnoldi solve).

Value

A problem, an algorithm, or the targets.

Examples

A <- diag(1:6)
solve(EigenvalueProblem(A, nev = 2), ArnoldiMethodJL())$values
#> [1] 6 5