[BGL] how to call Dijkstra

*Hi Tristram Thanks for the reply. I tried the short version too as you suggestedbut the error doesn't go away: Attached below is the new code snippet and the related error. Thanks sandeep std::map<Vertex, Vertex> pred; boost::associative_property_map< std::map<Vertex, Vertex> > pred_map(pred); std::map<Vertex, size_type> dist; boost::associative_property_map< std::map<Vertex, size_type> > dist_map(dist); std::map<Vertex, size_type> weight; boost::associative_property_map< std::map<Vertex, size_type> > weight_map(weight); Vertex v; boost::dijkstra_shortest_paths(G, v, pred_map, dist_map, weight_map); error: no matching function for call to 'dijkstra_shortest_paths(Graph&, leda::node_struct*&, boost::associative_property_map<std::map<leda::node_struct*, leda::node_struct*, std::less<leda::node_struct*>, std::allocator<std::pair<leda::node_struct* const, leda::node_struct*> > >
*
Hello

There is no function that takes exactly those parameters in that order. You should be using the named parameters version, which means you'll need to rename your property maps: dijkstra_shortest_paths(G, v, weight_map(weights). distance_map(dists). predecessor_map(preds)); Andrew Sutton andrew.n.sutton@gmail.com
participants (2)
-
Andrew Sutton
-
Sandeep Gupta