Documentation for Graphons.jl - A Julia package for sampling random graphs from graphon models.
Graphons are infinite-dimensional objects that represent the limit of large graphs. This package provides tools to:
- Define graphon models (continuous functions or block models)
- Sample finite graphs from these models
- Work with decorated graphons that have rich edge attributes
using Graphons
# Create a simple continuous graphon
g = SimpleContinuousGraphon((x, y) -> 0.3)
# Sample a random graph with 100 nodes
A = rand(g, 100)
# Create a stochastic block model
θ = [0.8 0.1; 0.1 0.8] # High within-block, low between-block probability
sizes = [0.5, 0.5] # Equal-sized blocks
sbm = SBM(θ, sizes)
A = rand(sbm, 200)- Simple Graphons: Work with continuous probability functions on [0,1]²
- Stochastic Block Models: Discrete graphons with block structure
- Decorated Graphons: Rich edge attributes using Distributions.jl or custom distributions
using Pkg
Pkg.add("Graphons")For more details and tutorials please refer to the documentation.