Boost logo

Boost Users :

From: Aaron Windsor (aaron.windsor_at_[hidden])
Date: 2006-04-25 06:44:22


On 4/25/06, Sebastian Weber <sebastian.weber_at_[hidden]> wrote:
> Hello everybody!
>
> I use the filtered_graph framework to restrict a BFS visit to a small
> region on my graph. BUT, I provide the starting vertex to the BFS
> routine by a vertice_descriptor of the underlying/unfiltered graph. Of
> course, this vertice descriptor matches the predicate. My code compiles
> fine, but I started to ask myself if this actually behaves correct?
>
> As I could not find a hint within the docs, does someone know?

Hi Sebastian,

Yes, that should work fine. filtered_graph redefines functions like
vertices, edges, adjacent_vertices, etc. so that they only return
vertices/edges from the original graph that match the predicates
you've provided. Once you dereference those iterators, you do get
vertex/edge descriptors from the original graph.

-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