I am currently designing an application composed of both a Boost Graph (adjacency_list) and several classes referencing edges or vertices from this structure.
My question is: what is the recommended way to maintain a reference to a node or a vertex?
I guess that in the iterator case the object access is faster but the iterator can be invalidated by dynamic changes on the graph structure.
On the opposite, a descriptor is an id which means that a search is necessary to retrieve the data but may be less prone to trigger a memory error in case the graph changes.
Is it true?