Boost logo

Boost Users :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-07-18 12:03:21


Hi Björn,

On Thu, 18 Jul 2002, [iso-8859-1] Björn Lindberg wrote:
yg-boo>
yg-boo> I have managed to use the traverse_tree algorithm with
yg-boo> graph_as_tree now. I just thought of something though. When I
yg-boo> traverse the tree, I will need access to several internal
yg-boo> properties at the nodes and also edges in the original graph.
yg-boo> Elsewhere I access them via property maps, but I can't see how
yg-boo> this could be done inside a TreeVisitor. Even if I take a Tree as
yg-boo> an argument to the TreeVisitor constructor, I won't be able to
yg-boo> extract the property maps from the graph inside the Tree
yg-boo> (graph_as_tree really), right?

Not a problem. I've added a parameter in the visitor function for the
tree, and I've added property map accessors to the underlying graph
for graph_as_tree. These updates are in CVS. Also, I've added an
example: libs/graph/example/graph_as_tree.cpp.

yg-boo> Right now I'm thinking that I should just skip graph_as_tree, and
yg-boo> reimplement the traverse_tree algorithm directly for graphs, so that I
yg-boo> can access all of the graph functionality. Would this be best do you
yg-boo> think, and have I made any oversights in the reasoning above?

The traverse_tree algorithm would be useful for DAGs. Perhaps a good
name for it would be traverse_DAG.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


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