Hi,
Attached below is the code to call Dijkstra over property_map data
structures. The current definition of associative property map is
incompatible for dijkstra. Somehow there is mismatch with respect to
operator[]. Attach below is the code and the error.
std::map pred;
boost::associative_property_map< std::map >
preds(pred);
std::map dist;
boost::associative_property_map< std::map >
dists(dist);
std::map weight;
boost::associative_property_map< std::map >
weights(weight);
vertex_t v;
//vertex_t v1 = preds[v];
dijkstra_shortest_paths(tg, v,
predecessor_map(preds).
weight_map(weights).
distance_map(dists)
);
Error:
/home/sandeep/Computing/boost_1_38_0/boost/property_map.hpp:314:
error: no match for ‘operator[]’ in ‘(const
boost::associative_property_map > > >&)((const
boost::associative_property_map > > >*)(& pa))[k]’
/home/sandeep/Computing/boost_1_38_0/boost/property_map.hpp:458: note:
candidates are: typename
UniquePairAssociativeContainer::value_type::second_type&
boost::associative_property_map<UniquePairAssociativeContainer>::operator[](const
typename UniquePairAssociativeContainer::key_type&) const [with
UniquePairAssociativeContainer = std::map > >]
Thanks
sandeep