Re: [Boost-users] BGL: filtered graph question
boost-users-request@lists.boost.org wrote:
Date: Tue, 25 Apr 2006 08:54:12 +0200 From: Sebastian Weber
Subject: [Boost-users] BGL: filtered graph question 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?
A quick look at the code tells that it is perfectly fine. The type of vertex_descriptor is the same as for the underlying graph and the vertex iterator is simply a filter_iterator using the provided predicate. Best, -- Grégoire Dooms
Hi!
A quick look at the code tells that it is perfectly fine. The type of vertex_descriptor is the same as for the underlying graph and the vertex iterator is simply a filter_iterator using the provided predicate.
Thanks a lot. My first impression by looking at the code told me the same story. But, I think this should actually be documented somewhere if this is supposed to be the case or not. To me it feels like it is an undocumented feature of the filtered_graph class and things in boost are usually well documented ... shouldn't one add this? Greetings, Sebastian Weber
Best, -- Grégoire Dooms
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Guys,
Quoting from the docs (http://www.boost.org/libs/graph/doc/
filtered_graph.html)
graph_traits
Hi!
A quick look at the code tells that it is perfectly fine. The type of vertex_descriptor is the same as for the underlying graph and the vertex iterator is simply a filter_iterator using the provided predicate.
Thanks a lot. My first impression by looking at the code told me the same story. But, I think this should actually be documented somewhere if this is supposed to be the case or not. To me it feels like it is an undocumented feature of the filtered_graph class and things in boost are usually well documented ... shouldn't one add this?
Greetings,
Sebastian Weber
Best, -- Grégoire Dooms
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi!
The type for the vertex descriptors associated with the filtered_graph, which is the same type as the vertex_descriptor for the original Graph.
Ok, once again, I'm the one overlooking some parts of the docs, shame on me! But another question: If I understand the implementation right, I can call base() on a filtered_graph-iterator to get an iterator of the base graph, right? This is just nice to know as this applies to all of the filtered graph iterators and can be very handy. Greetings, Sebastian
Cheers, Jeremy
On Apr 25, 2006, at 8:20 AM, Sebastian Weber wrote:
Hi!
A quick look at the code tells that it is perfectly fine. The type of vertex_descriptor is the same as for the underlying graph and the vertex iterator is simply a filter_iterator using the provided predicate.
Thanks a lot. My first impression by looking at the code told me the same story. But, I think this should actually be documented somewhere if this is supposed to be the case or not. To me it feels like it is an undocumented feature of the filtered_graph class and things in boost are usually well documented ... shouldn't one add this?
Greetings,
Sebastian Weber
Best, -- Grégoire Dooms
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Sebastian, On Apr 25, 2006, at 9:13 AM, Sebastian Weber wrote:
Ok, once again, I'm the one overlooking some parts of the docs, shame on me! But another question: If I understand the implementation right, I can call base() on a filtered_graph-iterator to get an iterator of the base graph, right? This is just nice to know as this applies to all of the filtered graph iterators and can be very handy.
That's mostly true... not true of the adjacency_iterator. This should be documented... I've added info about which iterators are filter iterators. Cheers, Jeremy
participants (3)
-
Grégoire Dooms
-
Jeremy Siek
-
Sebastian Weber