representations: Network Representation Functions

representationsR Documentation

Network Representation Functions

Description

This is a collection of functions that convert a graph stored as an igraph object into a desired matrix representation among adjacency matrix, graph laplacian, modularity matrix or graphon (edge probability matrix).

Usage

repr_adjacency(network, validate = TRUE)

repr_laplacian(network, validate = TRUE)

repr_modularity(network, validate = TRUE)

repr_graphon(network, validate = TRUE)

Arguments

network

An igraph object.

validate

A boolean specifying whether the function should check the class of its input (default: TRUE).

Value

A numeric square matrix giving the desired network representation recorded in the object's class.

Examples

g <- igraph::sample_smallworld(1, 25, 3, 0.05)
repr_adjacency(g)
repr_laplacian(g)
repr_modularity(g)
repr_graphon(g)

astamm/nevada documentation built on Sept. 9, 2023, 1:37 a.m.