I realize this might be pedantic, but are BGL vertex descriptors always unique? For background, I have the following graph definition:
typedef boost::adjacency_list<boost::setS, boost::listS, boost::undirectedS, VProp, EProp> Graph;
Where I'm using listS
as the node data structure. I know that this makes my descriptors, which appear to be of type void*
, "stable": when a node is removed from the graph, other descriptors for other nodes can still be used.
I've looked through the BGL documentation for forever, though, and I can't find a guarantee that these descriptors are unique. Essentially, I'm wondering if two descriptors are ==
if and only if the underlying node data they point to is the same. In other words, is comparing descriptors directly a valid way to check node equality?
Clearly this is true when the node data structure is vecS
(since the descriptor is an index in that case), but I haven't found any information in the case of listS
in the BGL docs.
Thanks in advance!