26 Oct
2011
26 Oct
'11
7:15 p.m.
On Wed, 26 Oct 2011, David Doria wrote:
This example works fine:
http://programmingexamples.net/index.php?title=CPP/Boost/BGL/DijkstraUndirec...
However, if I change
typedef boost::property<boost::edge_weight_t, float> EdgeWeightProperty;
to
struct EdgeWeightProperty{float weight;};
(and of course remove the lines adding the weights as properties: boost::add_edge(v1, v2, weight1, g); )
Did you change the weight map argument to dijkstra_shortest_paths to &EdgeWeightProperty::weight? It appears that you might not have; the error message is claiming that the weight map is error_property_not_found, which is what is produced when an old-style property map looked up in a graph doesn't exist. -- Jeremiah Willcock