module documentation

Undocumented

Function _rewire Randomly rewires the graph while preserving the degree distribution.
def _rewire(graph, n=None, allowed_edge_types='simple', *, mode=None): (source) ΒΆ

Randomly rewires the graph while preserving the degree distribution.

The rewiring is done "in-place", so the original graph will be modified. If you want to preserve the original graph, use the copy method before rewiring.

Parameters
graphUndocumented
nthe number of rewiring trials. The default is 10 times the number of edges.
allowed_edge_typesthe rewiring algorithm to use. It can either be "simple" or "loops"; the former does not create or destroy loop edges while the latter does.
modeUndocumented