I'm trying to understand roughly how boost's adjacency_list
works, and don't understand how edge descriptors can remain valid after remove_edge
is called when using an EdgeList
of std::vector
.
As far as I understand it, both vertex and edge descriptors are indexes into the adjacency list's central vertex and edge storage (also each a std::vector
). When an edge is removed, shouldn't this invalidate the descriptor (index) of all edges after the one removed in the storage? Or at least that of the edge that was moved from the end to fill the gap?