Learn R Programming

signnet (version 0.6.0)

laplacian_matrix_signed: Signed Graph Laplacian

Description

The Laplacian of a signed graph.

Usage

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

Arguments

g

igraph object. Must have 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.

Value

a numeric matrix

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
# NOT RUN {
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