Module generators

Source
Expand description

This module contains generator functions for building graphs

Structs§

InvalidInputError
Error returned by generator functions when the input arguments are an invalid combination (such as missing required options).

Functions§

barabasi_albert_graph
Generate a random Barabási–Albert preferential attachment algorithm
barbell_graph
Generate a barbell graph where two identical complete graphs are connected by a path.
binomial_tree_graph
Generate a binomial tree graph
complete_graph
Generate a complete graph
cycle_graph
Generate a cycle graph
dorogovtsev_goltsev_mendes_graph
Generate a Dorogovtsev-Goltsev-Mendes graph
full_rary_tree_graph
Generate a full r-ary tree of n nodes. Sometimes called a k-ary, n-ary, or m-ary tree.
gnm_random_graph
Generate a Gnm random graph, also known as an Erdős-Rényi graph.
gnp_random_graph
Generate a Gnp random graph, also known as an Erdős-Rényi graph or a binomial graph.
grid_graph
Generate a grid graph
heavy_hex_graph
Generate a heavy hex graph.
heavy_square_graph
Generate a heavy square graph.
hexagonal_lattice_graph
Generate a hexagonal lattice graph
hexagonal_lattice_graph_weighted
Generate a hexagonal lattice graph where each node is assigned a weight depending on its position in the lattice.
hyperbolic_random_graph
Generate a hyperbolic random undirected graph (also called hyperbolic geometric graph).
karate_club_graph
Generates Zachary’s Karate Club graph.
lollipop_graph
Generate a lollipop graph where a complete graph is connected to a path.
path_graph
Generate a path graph
petersen_graph
Generate a generalized Petersen graph G(n, k) with 2n nodes and 3n edges.
random_bipartite_graph
Generate a random bipartite graph.
random_geometric_graph
Generate a random geometric graph in the unit cube of dimensions dim.
sbm_random_graph
Generate a graph from the stochastic block model.
star_graph
Generate a star graph