random_reference(G, niter=1, connectivity=True, seed=None)¶
Compute a random graph by swapping edges of a given graph.
G (graph) – An undirected graph with 4 or more nodes.
niter (integer (optional, default=1)) – An edge is rewired approximately
connectivity (boolean (optional, default=True)) – When True, ensure connectivity for the randomized graph.
seed (integer, random_state, or None (default)) – Indicator of random number generation state. See Randomness.
G – The randomized graph.
- Return type
The implementation is adapted from the algorithm by Maslov and Sneppen (2002) 1.
Maslov, Sergei, and Kim Sneppen. “Specificity and stability in topology of protein networks.” Science 296.5569 (2002): 910-913.