Boost Users :
Subject: Re: [Boost-users] Boost.Graph set of edges
From: Johan Oudinet (johan.oudinet_at_[hidden])
Date: 2009-03-11 13:18:57
On Wed, Mar 11, 2009 at 5:40 PM, Johan Oudinet <johan.oudinet_at_[hidden]> wrote:
> On Thu, May 1, 2008 at 5:29 PM, James Sutherland
> <James.Sutherland_at_[hidden]> wrote:
>> Can you do something like
>> typedef boost::graph_traits<Graph>::edge_descriptor Edge;
>> Edge e;
>> std::set<Edge> edges;
>> edgeSet.insert( e );
>> I am getting compiler errors that imply that the edge_descriptor does
>> not implement the < operator.
> I'm experiencing the same issue... I'd like defining an operator< for
> the specific edge_descriptor I have (i.e., I use boost::vecS for the
> edge container), but I don't know what kind of type edge_descriptor
> Or maybe, I can safety convert an edge_descriptor to a standard type like 'int'?
I finally found the implementation of edge_descriptor in
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!
Hope it will be useful for someone else.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net