Changes in test/tsp_test.cc [1092:dceba191c00d:1106:1ba759c76810] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/tsp_test.cc
r1092 r1106 67 67 68 68 int node_cnt = 0; 69 for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it) { 70 FullGraph::Node node = *it; 71 if (used[node]) return false; 72 used[node] = true; 73 ++node_cnt; 74 } 69 for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it) 70 { 71 FullGraph::Node node = *it; 72 if (used[node]) return false; 73 used[node] = true; 74 ++node_cnt; 75 } 75 76 76 77 return (node_cnt == gr.nodeNum()); … … 132 133 int esize = n <= 1 ? 0 : n; 133 134 134 TSP alg(g, constMap<Edge, int>(1)); 135 ConstMap<Edge, int> cost_map(1); 136 TSP alg(g, cost_map); 135 137 136 138 check(alg.run() == esize, alg_name + ": Wrong total cost"); … … 265 267 tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy"); 266 268 tspTestSmall<NearestInsertionTsp<ConstMap<Edge, int> > >("Nearest Insertion"); 267 tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > >("Farthest Insertion"); 268 tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > >("Cheapest Insertion"); 269 tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > > 270 ("Farthest Insertion"); 271 tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > > 272 ("Cheapest Insertion"); 269 273 tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion"); 270 274 tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides");
Note: See TracChangeset
for help on using the changeset viewer.