• Tiago Peixoto's avatar
    Fix graph_rewire "can't rewire" bug · 6defdb43
    Tiago Peixoto authored
    This finally fixes in the bug addressed by commit 309ddbbd, where
    parallel edges could be erroneously created. In fact, the bug was more
    serious: The source and target edge lists always pointed to the same
    list (in the uncorrelated case, but could occasionally happen for the
    correlated case also) which got shuffled during iteration. Since the
    shuffling of one list interfered with the shuffling of the other, some
    combinations of source and target edges could simply never be
    considered... This commit forces both lists to always be independent.
    6defdb43