On Wed, Mar 11, 2009 at 6:30 PM, Michael Fawcett
On Wed, Mar 11, 2009 at 1:18 PM, Johan Oudinet
wrote: I finally found the implementation of edge_descriptor in boost/graph/detail/edge.hpp Since I found that operator== use get_property method, I defined an operator < that compares results of get_property()
I think it works for my graphs. But I have no idea of the limitations of this silly workaround!
Strangely enough, I use std::set
without having to define a less-than operator. Perhaps it has to do with what the vertex and edge storage types are? I use vecS for both. Hope it will be useful for someone else.
There have been threads in the past where this same solution was posted. I can't remember what the authors said about portability and correctness, but I would search the mailing lists for "edge_descriptor" + "operator".
Ok. It's because I use boost 1.34.1 (that is the current version in Ubuntu Intrepid repositories!). I've just checked for in the last Boost version (1.38) and, now, the operator< is defined in the file boost/graph/detail/edge.hpp Since they compare get_property() as I do, I know I can safety do it ;) Thanks Michael for pointing me out that I'm using an old version. Regards, -- Johan