• Tiago Peixoto's avatar
    Improve speed of random_rewire() when parallel edges are not allowed · 0e21f9a5
    Tiago Peixoto authored
    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.
    0e21f9a5
graph_rewiring.hh 43.3 KB