Rust library - net_ensembles

Crate Docs Rust unit tests - master
Implements simple sampling and monte carlo (or rather markov-) steps, that can be used to create a markov chain.
This is intended to be used for various different use cases. As such, you can easily define additional data that should be stored at each vertex.


Add this to your Cargo.toml:

net_ensembles = "0.3"
# for feature "serde_support" (enabled by default) also use
serde = { version = "1.0", features = ["derive"] }

If you do not need serde support, add this instead:

net_ensembles = { version = "0.3", default-features = false  }

currently implemented graph ensembles

  • Erdős-Rényi (x2)
  • small-world


  • visualize the current graph (create a *.dot file)
  • average degree
  • connected components
  • diameter
  • is_connected
  • leaf count
  • q_core
  • transitivity
  • biconnected component
  • vertex_load (closely related, often equal to betweeness)


  • depth first search from index
  • breadth first search from index
  • over additional data

For each vertex

  • degree
  • check adjacency with other nodes
  • access additional data


  • iterate over indices stored in adjacency list



No warranties whatsoever, but since I am writing this library for my own simulations, I do my best to avoid errors.
If you notice any bugs, or want to request new features: do not hesitate to open a new issue on the repository.