
Hi, I am trying to use metric_tsp_approx on a graph defined as : typedef adjacency_list<vecS, vecS, undirectedS, City, Road> Graph; City contains the vertex id and Road the edge weight. After reading the documentation, I arrived to : metric_tsp_approx(g_init, weight_map(get(&Road::length, g_init)). vertex_index_map(get(&City::id, g_init)), make_tsp_tour_visitor(back_inserter(c))); I have compilation errors however. The relevant part seems to be : /usr/include/boost/property_map/property_map.hpp:382:58: error: no type named ‘key_type’ in ‘struct boost::property_traits<boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, City, Road>, long unsigned int, City, int>, boost::vertex_index_t, boost::no_property> >’ Any help appreciated, thanks. -- Alexis Praga, PhD Student (CERFACS) GPG key : AD4A AF6D BB5C 042F 9422 1223 06E1 C1BF E287 65D0