Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Graph set of edges
From: Johan Oudinet (johan.oudinet_at_[hidden])
Date: 2009-03-15 14:06:11


On Wed, Mar 11, 2009 at 6:30 PM, Michael Fawcett
<michael.fawcett_at_[hidden]> wrote:
> On Wed, Mar 11, 2009 at 1:18 PM, Johan Oudinet <johan.oudinet_at_[hidden]> 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<edge_descriptor> 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

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