On 4/25/06, Sebastian Weber
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