Learn R Programming

motifcluster (version 0.2.3)

build_laplacian: 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"))

Value

The specified Laplacian matrix.

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).

Examples

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

Run the code above in your browser using DataLab