Boost logo

Boost Users :

From: Dmitry Bufistov (dmitry_at_[hidden])
Date: 2006-04-21 04:41:38


I'm using the following for a couple of monthes. Seems to work.
//////////////////////////////////////////
struct edge_less_than
    : public std::binary_function<edge_descriptor_t, edge_descriptor_t,
bool>
{
      bool operator()(const edge_descriptor_t& __x,
                 const edge_descriptor_t& __y) const
      {
      //return __x.second.get_property() < __y.second.get_property();
                 //return &__x < &__y;
                 return __x.get_property() < __y.get_property();
      }
  };

You can do something better depending of what you need. Possible this
will help
http://lists.boost.org/boost-users/2004/08/7579.php
Regards,
--dima
Thomas Costa wrote:
> write your own total ordering/comparison function object for Edge
> objects and declare the map type using this function.
>
> On Apr 20, 2006, at 7:55 PM, Irek Szczesniak wrote:
>
>


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