build_laplacian: Build a Laplacian matrix

View source: R/spectral.R

build_laplacianR Documentation

Build a Laplacian matrix

Description

Build a Laplacian matrix (combinatorial Laplacian or random-walk Laplacian) from a symmetric (weighted) graph adjacency matrix.

Usage

build_laplacian(adj_mat, type_lap = c("comb", "rw"))

Arguments

adj_mat

Symmetric adjacency matrix from which to build the Laplacian.

type_lap

Type of Laplacian to build. One of "comb" (combinatorial) or "rw" (random-walk).

Value

The specified Laplacian matrix.

Examples

adj_mat <- matrix(c(1:9), nrow = 3)
build_laplacian(adj_mat, "rw")

motifcluster documentation built on Nov. 18, 2022, 9:06 a.m.