# ``igraph`.`rewiring``

module documentation
(source)

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
graph | Undocumented
n | the number of rewiring trials. The default is 10 times the number of edges.
allowed_edge_types | the rewiring algorithm to use. It can either be `"simple"` or `"loops"`; the former does not create or destroy loop edges while the latter does.
mode | Undocumented