By default uses a random initialization vector that you can make deterministic using set.seed or override by specifying opts = list(initvec = ...).

eig_decomp(M, n_eigs, sym, ..., opts = list())

Arguments

M

A matrix (e.g. from the Matrix package) or a function (see eigs).

n_eigs

Number of eigenvectors to return.

sym

defunct and ignored.

...

Passed to eigs.

Value

see eigs.

Examples

eig_decomp(cbind(c(1,-1), c(-1,1)), 2)
#> Error in eigs_real_sym(A, nrow(A), k, which, sigma, opts, mattype = "sym_matrix", extra_args = list(use_lower = TRUE)): dimension of 'A' must be at least 3