[BGL] problems with depth_first_search

Hello list members, I tries to use 'depth_first_search' in a very simple manner but I get an weird compilation error. Here's a snippet of my code: typedef adjacency_list<listS, listS, bidirectionalS, Vertex> BGL_Graph; // Vertex is a bundled property BGL_Graph g(...) . . . typedef boost::property_map<BGL_Graph, boost::vertex_index_t>::type VertexIndexMap; VertexIndexMap vertex_id = boost::get(boost::vertex_index, g); vector<default_color_type> colormap(num_vertices(g)); depth_first_search( g , visitor(default_dfs_visitor()) , make_iterator_property_map(colormap.begin(), vertex_id) ); I use a graph with listS for the VertexList. Then I try to specify my own color map (created like the default color map) and want to set a dfs visitor (here the default one). But the compiler can't find 'initialize_vertx' and 'start_vertex'. I atteched the compiler output but it's a german version. greetz Manuel -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx

On Wed, Jul 9, 2008 at 6:25 PM, M. Siebeneicher <trashing@gmx.net> wrote:
typedef adjacency_list<listS, listS, bidirectionalS, Vertex> BGL_Graph; // Vertex is a bundled property BGL_Graph g(...)
typedef boost::property_map<BGL_Graph, boost::vertex_index_t>::type VertexIndexMap; VertexIndexMap vertex_id = boost::get(boost::vertex_index, g);
vertex_index is a property included in vecS but not in listS container. You have to provide your own vertex_index map. This is a classical error, and you can find a solution in this mailing list archives... -- Johan
participants (2)
-
Johan Oudinet
-
M. Siebeneicher