Skip to contents

Solves the generalized eigenvalue problem `A v = λ B v` where A and B are typically sparse graph Laplacians (e.g., `L_task` and `L_conn`). It finds eigenvectors corresponding to the smallest magnitude eigenvalues (`λ`).

Usage

solve_gev_laplacian_primme(
  A,
  B,
  k_request,
  lambda_max_thresh = 0.8,
  epsilon_reg_B = 1e-06,
  tol = 1e-08,
  primme_which = "SA",
  ...
)

Arguments

A

The sparse, symmetric matrix on the left side (e.g., `L_task`, `dgCMatrix`).

B

The sparse, symmetric, positive semi-definite matrix on the right side (e.g., `L_conn`, `dgCMatrix`). Will be regularized.

k_request

Integer, the number of eigenvalues/vectors to compute (`NEig`).

lambda_max_thresh

Numeric, the maximum absolute eigenvalue (`|λ|`) to retain. Eigenpairs with `abs(values) >= lambda_max_thresh` are discarded.

epsilon_reg_B

Numeric, small value to add to the diagonal of B for regularization (`B_reg = B + epsilon_reg_B * I`). Helps ensure B is positive definite for the solver. Default 1e-6.

tol

Numeric, tolerance for eigenvalue decomposition convergence. Default 1e-8 (PRIMME's default is 1e-6, using slightly tighter).

primme_which

Character string passed to `PRIMME::eigs_sym` to control which eigenvalues are computed. Defaults to "SA" (smallest algebraic) which targets the smallest eigenvalues.

...

Additional arguments passed to `PRIMME::eigs_sym`.

Value

A list containing:

  • vectors: A dense matrix (`V_p x k_actual`) of filtered eigenvectors.

  • values: A numeric vector of the corresponding filtered eigenvalues.

  • n_converged: The number of eigenpairs PRIMME reports converged.

  • n_filtered: The number of eigenpairs remaining after filtering.

  • primme_stats: The stats list returned by PRIMME.

Throws an error if computation fails. Note: Stability filtering based on split-half reliability (`r_split`) needs to be applied separately. Eigenvectors are B-orthogonal.