Self loops cause double-remove of edges because in this case both, successor and predecessor, are equal to index and thus
the sequence of edges that deal with the removed vertex contains edge (index, index) twice.
This problem can be avoided if we use set semantics instead.
Self loops cause double-remove of edges because in this case both, successor and predecessor, are equal to index and thus the sequence of edges that deal with the removed vertex contains edge (index, index) twice.
This problem can be avoided if we use set semantics instead.