|
Boost Users : |
From: Aaron Windsor (aaron.windsor_at_[hidden])
Date: 2007-04-19 20:53:42
On 4/19/07, Dima F. <quantera_at_[hidden]> wrote:
>
> 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
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