[BGL] setS as an edge container

I'm attempting to set up pathfinding using Dijkstra's algorithm, and decided to
use setS since I need to add/remove edges frequently and don't want to worry
about adding parallel edges. My typedefs are such:
typedef property

On Tuesday, 28. December 2010 20:02:01 Datalurkur wrote:
I'm attempting to set up pathfinding using Dijkstra's algorithm, and decided to use setS since I need to add/remove edges frequently and don't want to worry about adding parallel edges. My typedefs are such:
typedef property
Weight; typedef adjacency_list Graph; typedef graph_traits<Graph>::vertex_descriptor VertexDescriptor; typedef graph_traits<Graph>::edge_descriptor EdgeDescriptor; However, when trying to actually call dijkstra_shortest_paths, like so:
std::vector<VertexDescriptor> predecessorMap(num_vertices(*_graph)); std::vector<int> distanceMap(num_vertices(*_graph)); dijkstra_shortest_paths(*_graph, startVertex, predecessor_map(&predecessorMap[0]).distance_map(&distanceMap[0]));
I wind up with a bunch of compile errors within boost. Some examples: .../Boost.framework/Headers/graph/dijkstra_shortest_paths.hpp:377: error: no matching function for call to 'put(int*&, void* const&, int&)' .../Boost.framework/Headers/graph/two_bit_color_map.hpp:77: error: invalid cast from type 'boost::detail::error_property_not_found' to type 'size_t' .../Boost.framework/Headers/graph/dijkstra_shortest_paths.hpp:139: error: no matching function for call to 'get(int*&, void*)'
I suspect it has something to do with the index map, but I assumed that vertex mappings that used vecS didn't need to be supplied with an index map.
You got that right, actually, but in your code, you are not using the vecS for
the vertices but for the edges. Seems to me that you simply mixed up the
positions.
Pleas see: adjacency_list
I followed the dijkstra example as closely as possible, but since they have a static set of edges and use vecS to store the edge map, I'm pretty certain that's where the discrepancy lies. Any other examples, advice?
Best, Cedric

Happy new year ! Dear boost users, I don' understand this warning (g++, boost v1.42): "export.hpp:129: warning: type qualifiers ignored on function return type" -------------------------- export.hpp -------------------------- template<class T> struct guid_initializer { ... (L.129) const void export_guid(mpl::true_) const { } ... }; ----------------------- This warning happens when i use the BOOST_CLASS_EXPORT macro. Any idea ? Thanks, Damien.

dada@lamef.bordeaux.ensam.fr wrote:
Happy new year !
Dear boost users,
I don' understand this warning (g++, boost v1.42): "export.hpp:129: warning: type qualifiers ignored on function return type" -------------------------- export.hpp -------------------------- template<class T> struct guid_initializer { ... (L.129) const void export_guid(mpl::true_) const { } ... }; -----------------------
This warning happens when i use the BOOST_CLASS_EXPORT macro. Any idea ? Thanks, Damien.
This is an innocuous coding error in export.hpp. The warning can be ignored and has since been removed. Robert Ramey

Robert Ramey
dada@lamef.bordeaux.ensam.fr wrote:
Happy new year !
Dear boost users,
I don' understand this warning (g++, boost v1.42): "export.hpp:129: warning: type qualifiers ignored on function return type" -------------------------- export.hpp -------------------------- template<class T> struct guid_initializer { ... (L.129) const void export_guid(mpl::true_) const { } ... }; -----------------------
This warning happens when i use the BOOST_CLASS_EXPORT macro. Any idea ? Thanks, Damien.
This is an innocuous coding error in export.hpp. The warning can be ignored and has since been removed.
Robert Ramey
Ok, thanks for your answer, could i safely replace the "const void" by "void" in export.hpp sources ? "const void export_guid(mpl::true_) const" become " void export_guid(mpl::true_) const"
participants (4)
-
Cedric Laczny
-
dada@lamef.bordeaux.ensam.fr
-
Datalurkur
-
Robert Ramey