Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Filtered_graph edgepredicate
From: Gábor Szuromi (kukkerman_at_[hidden])
Date: 2010-04-26 20:00:08


Hi!

You only need one template argument: the color map. The other types
(color and edge descriptor) can be deduced from the property map:

template <typename EdgeColourMap>
struct same_edge_colour {
       same_edge_colour(): t_colour(){ }
       same_edge_colour(typename EdgeColourMap::value_type a,
EdgeColourMap m) : t_colour(a),m_colours(m){ }
 bool operator()(const typename EdgeColourMap::key_type& e) const {
         return boost::get(m_colours,e)==t_colour;
 }
 typename EdgeColourMap::value_type t_colour;
 EdgeColourMap m_colours;
};

Cheers,
  Gabe


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