I'm reading the documentation about adjacency_list and the impact choosing the graph type has on memory consumption, big-O runtime, and descriptor stability.
Quoting the first link:
The following table summarizes which operations cause descriptors and iterators to become invalid. In the table, EL is an abbreviation for OutEdgeList and VL means VertexList. The Adj Iter category includes the out_edge_iterator, in_edge_iterator, and adjacency_iterator types.
A more detailed description of descriptor and iterator invalidation is given in the documentation for each operation.
I understand that if one uses vecS
for the VertexList
that on remove_vertex()
all vertex descriptors will be adjusted so that they are still continuous.
I do not understand why, apparently, using vecS
causes the edge iteration to invalidate edge descriptors.
Do I understand the table correctly in that it is saying "If you use vecS
for the Edge List type on an adjacency_list
graph that is directedS
then you can not stably iterate over the edges because iterating over them will invalidate the edge iterators and edge descriptors"?
If I do understand this correctly, please explain why this is the case. If I misunderstand, please clarify the actual effect using vecS
for the Edge List has.
Thank you.