Learn R Programming

signnet (version 1.0.5)

laplacian_matrix_signed: Signed Graph Laplacian

Description

The Laplacian of a signed graph.

Usage

laplacian_matrix_signed(g, norm = FALSE, sparse = FALSE)

Value

a numeric matrix

Arguments

g

igraph object with a sign edge attribute.

norm

Whether to calculate the normalized Laplacian. See definitions below.

sparse

Logical scalar, whether to return the result as a sparse matrix. The Matrix package is required for sparse matrices.

Author

David Schoch

Details

See laplacian_matrix of igraph for more details. In the signed case, D is a diagonal matrix containing the absolute values of row sums of the signed adjacency matrix.

Examples

Run this code
library(igraph)
g <- sample_islands_signed(3, 10, 5 / 10, 1)
laplacian_matrix_signed(g)
laplacian_matrix_signed(g, norm = TRUE)

Run the code above in your browser using DataLab