Learn R Programming

HyperG (version 1.0.0)

hypergraph_laplacian_matrix: Laplacian Matrix

Description

The Laplacian of a hypergraph is D-A, where A is the (weighted) adjacency matrix, and D is the row-sums.

Usage

hypergraph_laplacian_matrix(h,normalize=FALSE)

Arguments

h

a hypergraph.

normalize

logical. Whether to normalize the Laplacian matrix.

Value

a (sparse) matrix.

Details

The Laplacian is D-A, where D is the row sums of the adjacency matrix A. If normalize is TRUE, then the normalized version is returned.

See Also

laplacian_matrix.

Examples

Run this code
# NOT RUN {
 h <- hypergraph_from_edgelist(list(1:4,2:5,c(3,5,7,8,10),c(2,9),c(2:3,6,10)))
 L <- hypergraph_laplacian_matrix(h)
 Ln <- hypergraph_laplacian_matrix(h,normalize=TRUE)
# }

Run the code above in your browser using DataLab