FastDecompositionLap: Fast eigendecomposition of Laplacian matrix

View source: R/utilities.R

FastDecompositionLapR Documentation

Fast eigendecomposition of Laplacian matrix

Description

Perform fast eigendecomposition using RSpectra for large matrices

Usage

FastDecompositionLap(
  laplacianMat = NULL,
  k_eigen = 25,
  which = "LM",
  sigma = NULL,
  opts = list(),
  lower = TRUE,
  ...
)

Arguments

laplacianMat

Laplacian matrix

k_eigen

Number of eigenvalues to compute (default: 25)

which

Which eigenvalues to compute ("LM", "SM", etc.)

sigma

Shift parameter for eigenvalue computation

opts

Additional options for eigenvalue computation

lower

Whether to compute from lower end of spectrum

...

Additional arguments

Value

List with eigenvalues (evalues) and eigenvectors (evectors)

Examples


# Create a Laplacian matrix and decompose
L <- matrix(c(2, -1, -1, -1, 2, -1, -1, -1, 2), nrow = 3)
decomp <- FastDecompositionLap(L, k_eigen = 2)


BioGSP documentation built on Feb. 2, 2026, 5:06 p.m.