- lattice_reference(G, niter=5, D=None, connectivity=True, seed=None)[source]#
Latticize the given graph by swapping edges.
An undirected graph.
- niterinteger (optional, default=1)
An edge is rewired approximately niter times.
- Dnumpy.array (optional, default=None)
Distance to the diagonal matrix.
- connectivityboolean (optional, default=True)
Ensure connectivity for the latticized graph when set to True.
- seedinteger, random_state, or None (default)
Indicator of random number generation state. See Randomness.
The latticized graph.
If there are fewer than 4 nodes or 2 edges in
The implementation is adapted from the algorithm by Sporns et al. . which is inspired from the original work by Maslov and Sneppen(2002) .