Boost logo

Boost Users :

From: Stephen Torri (storri_at_[hidden])
Date: 2005-02-28 19:42:20


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 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