|
Boost Users : |
Subject: Re: [Boost-users] [BGL] Filtered_graph edgepredicate
From: Line Blander Reinhardt (lbre_at_[hidden])
Date: 2010-04-29 03:30:39
Thanks a bunch for your help
Line
________________________________________
Fra: boost-users-bounces_at_[hidden] [boost-users-bounces_at_[hidden]] På vegne af Gábor Szuromi [kukkerman_at_[hidden]]
Sendt: 27. april 2010 02:00
Til: boost-users_at_[hidden]
Emne: Re: [Boost-users] [BGL] Filtered_graph edgepredicate
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 mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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