Learn R Programming

graphpcor (version 0.1.12)

Laplacian: The Laplacian of a graph

Description

The (symmetric) Laplacian of a graph is a square matrix with dimention equal the number of nodes. It is defined as $$L_{ij} = n_i \textrm{ if } i=j, -1 \textrm{ if } i\sim j, 0 \textrm{ otherwise}$$ where i~j means that there is an edge between nodes i and j and n_i is the number of edges including node i.

Usage

Laplacian(graph)

# S3 method for default Laplacian(graph)

# S3 method for matrix Laplacian(graph)

Value

matrix as the Laplacian of a graph

Arguments

graph

an object that inherits a matrix class

Methods (by class)

  • Laplacian(default): The Laplacian default method (none)

  • Laplacian(matrix): The Laplacian of a matrix