lattice_reference(G, niter=1, D=None, connectivity=True, seed=None)¶
Latticize the given graph by swapping edges.
G (graph) – An undirected graph with 4 or more nodes.
niter (integer (optional, default=1)) – An edge is rewired approximatively niter times.
D (numpy.array (optional, default=None)) – Distance to the diagonal matrix.
connectivity (boolean (optional, default=True)) – Ensure connectivity for the latticized graph when set to True.
seed (integer, random_state, or None (default)) – Indicator of random number generation state. See Randomness.
G – The latticized graph.
- Return type