From: Alexis Praga
To: boost-users@lists.boost.org Sent: Sunday, April 13, 2014 3:02 PM Subject: [Boost-users] Using metric_tsp_approx with bundled properties Hi,
I am trying to use metric_tsp_approx on a graph defined as :
typedef adjacency_list
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)));
After your first named argument, you need to use named arguments for the rest of the argument list: metric_tsp_approx(g_init, weight_map(...).vertex_index_map(...).visitor(...)); Fixing that might fix your compilation errors. -- Jeremiah Willcock