On 4/19/07, Dima F.
Hello everybody,
Often, given a graph G and a subset of it's vertices, there is a need to perform something on an induced graph containing those vertices. I thought about using filtered_graph for that purpose, but for some reason I am unable to use breadth_first_search with a filtered_graph - I get pages of errors from the compiler complaining about something in filtered_graph.hpp, and I don't understand what is the problem. Here is a minimal test program which exemplifies the error. Note that if the line containing a call to a breadth_first_search is commented out, everything compiles properly. What is the problem here?
<snip code> Hi Dima, Your predicate should have const member functions - replace bool operator()(const vertex_t &v) {} bool operator()(const edge_t &e) {} with bool operator()(const vertex_t &v) const {} bool operator()(const edge_t &e) const {} and it should compile. Regards, Aaron