Boost logo

Boost Users :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2005-03-01 10:46:19


Hi Stephen,

Hmm, not sure if I understand you. The default_dfs_visitor
doesn't do anything... are you defining your own visitor,
inheriting from the default_dfs_visitor?

Have you looked at the examples?

libs/graph/example/dfs-example.cpp
libs/graph/example/dfs-parenthesis.cpp

Cheers,
Jeremy

On Feb 28, 2005, at 7:42 PM, Stephen Torri wrote:

> I am using the default depth_first_search visitor with an graph setup
> as
> follows:
>
> typedef property< vertex_index_t, uint32_t,
> property< vertex_name_t,
> boost::shared_ptr<Component> > >
> VertexProperty;
>
> typedef adjacency_list<setS, // OutEdgeList
> setS, // VertexList
> directedS, // Directed
> VertexProperty> // VertexProperties
> Graph_Type;
>
> typedef graph_traits<Graph_Base::Graph_Type>::vertex_descriptor
> Vertex;
>
> typedef graph_traits<Graph_Base::Graph_Type>::edge_descriptor
> Edge;
>
> The graph contains Component class objects. I want to visit each
> Component and execute the function run().
>
> The test graph I have is a simple two node graph:
>
> node A ---> node B
>
> When I use the depth_first_search with my visitor I see that it only
> visits node A. I do not know why this is the case. I have only
> implemented the discover_vertex function in it. I have std::cout
> messages for telling me various steps of run() have been done. I cannot
> see how to have the visitor say what its doing (e.g. "I'm in node A.
> Executing run(). Considering moving to node B).
>
> What I need assistance on is how do I debug my visitor?
>
> I am only sending the graph and the visitor to my call to
> depth_first_search:
>
>
> // Let Graph Visitor run through the Graph
> // (visit Input graph)
> depth_first_search (test_graph_ptr->get_Graph(),
> visitor(vis));
>
> Stephen
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Jeremy Siek <jsiek_at_[hidden]>
http://www.osl.iu.edu/~jsiek
Ph.D. Student, Indiana University Bloomington
C++ Booster (http://www.boost.org)
_______________________________________________


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