The question is about the Boost Graph Library
(there is no such label unfortunately).
Suppose that I have associated a Widget
instance with each vertex of a graph by using the bundled property feature of the Boost Graph Library
. The class Widget
implements operator==
and all widgets associated with vertices are distinct (i.e., for any pair of vertices, widget1 != widget2
holds for the widgets associated with these vertices).
Does the graph maintain a reverse mapping, i.e. can I easily retrieve a vertex descriptor that corresponds to a given object? In particular, suppose that I have objects widget1
and widget2
and the corresponding vertices have been added into the graph. How can I add an edge between the two objects (i.e. between the corresponding vertices)?