Improve speed of random_rewire() when parallel edges are not allowed
This also changes the semantics of random_rewire() when parallel edges / self loops are forbidden, but the initial graph contains them. Now, instead of throwing an exception, the rewiring is attempted, with no new parallel edges / self-loops being created. Under some circumstances, if the degree sequence is graphical, eventually the graph can become simple after sufficiently many sweeps.
Please register or sign in to comment