diff options
Diffstat (limited to 'boost/graph/metric_tsp_approx.hpp')
-rw-r--r-- | boost/graph/metric_tsp_approx.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/boost/graph/metric_tsp_approx.hpp b/boost/graph/metric_tsp_approx.hpp index ff81b9f0d7..c8e7dba595 100644 --- a/boost/graph/metric_tsp_approx.hpp +++ b/boost/graph/metric_tsp_approx.hpp @@ -173,7 +173,6 @@ namespace boost // We build a custom graph in this algorithm. typedef adjacency_list <vecS, vecS, directedS, no_property, no_property > MSTImpl; - typedef graph_traits<MSTImpl>::edge_descriptor Edge; typedef graph_traits<MSTImpl>::vertex_descriptor Vertex; typedef graph_traits<MSTImpl>::vertex_iterator VItr; @@ -216,7 +215,7 @@ namespace boost // Create tour using a preorder traversal of the mst vector<Node> tour; PreorderTraverser<Node, Tree> tvis(tour); - traverse_tree(0, t, tvis); + traverse_tree(indexmap[start], t, tvis); pair<GVItr, GVItr> g_verts(vertices(g)); for(PreorderTraverser<Node, Tree>::const_iterator curr(tvis.begin()); @@ -228,7 +227,7 @@ namespace boost } // Connect back to the start of the tour - vis.visit_vertex(*g_verts.first, g); + vis.visit_vertex(start, g); } // Default tsp tour visitor that puts the tour in an OutputIterator |