|
Boost Users : |
Subject: Re: [Boost-users] [BGL] how to call Dijkstra
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2008-11-03 07:43:38
>
> * 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*> > >
> >&, boost::associative_property_map<std::map<leda::node_struct*, int,
> std::less<leda::node_struct*>, std::allocator<std::pair<leda::node_struct*
> const, int> > > >&,
> boost::associative_property_map<std::map<leda::node_struct*, int,
> std::less<leda::node_struct*>, std::allocator<std::pair<leda::node_struct*
> const, int> > > >&)'
> *
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_at_[hidden]
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