11 May
2004
11 May
'04
2:31 p.m.
On Tuesday 11 May 2004 05:59 am, boost@spyderworks.de wrote:
Hi, is it possible to use an edge_descriptor (boost::graph_traits<G>::edge_descriptor) as key in a map?
In general, no. Edge descriptors can typically only be compared via == and !=. One notable exception is when the edge list type is "vecS" in an adjacent_list, because those edge descriptors can be used as integral types.
I intend to write a visitor class which sets a boolean to each edge, and therefore I need the edge as key.
Common ways to do this include using internal properties and maintaining your own edge_index (internal) property so that you can build property maps out of vectors. Doug