Expand description
Graph generation algorithms
This module provides functions for generating various types of graphs:
- Random graphs (Erdős–Rényi, Barabási–Albert, etc.)
- Regular graphs (complete, star, path, cycle)
- Lattice graphs
- Small-world networks
Functions§
- barabasi_
albert_ graph - Generates a Barabási–Albert preferential attachment graph
- complete_
graph - Generates a complete graph (clique)
- configuration_
model - Generates a random graph using the Configuration Model
- create_
digraph - Create a new empty directed graph
- create_
graph - Create a new empty undirected graph
- cycle_
graph - Generates a cycle graph (circular arrangement of nodes)
- erdos_
renyi_ graph - Generates an Erdős–Rényi random graph
- forest_
graph - Generates a random forest (collection of trees)
- grid_
2d_ graph - Generates a 2D grid/lattice graph
- grid_
3d_ graph - Generates a 3D grid/lattice graph
- hexagonal_
lattice_ graph - Generates a hexagonal lattice graph (honeycomb structure)
- path_
graph - Generates a path graph (nodes connected in a line)
- planted_
partition_ model - Generates a planted partition model (special case of SBM)
- random_
spanning_ tree - Generates a random spanning tree from an existing graph
- simple_
configuration_ model - Generates a simple random graph using the Configuration Model
- star_
graph - Generates a star graph with one central node connected to all others
- stochastic_
block_ model - Generates a graph using the Stochastic Block Model (SBM)
- tree_
graph - Generates a random tree with n nodes
- triangular_
lattice_ graph - Generates a triangular lattice graph
- two_
community_ sbm - Generates a simple stochastic block model with two communities
- watts_
strogatz_ graph - Generates a Watts-Strogatz small-world graph