Changes in test/tsp_test.cc [1106:1ba759c76810:1092:dceba191c00d] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/tsp_test.cc
r1106 r1092 67 67 68 68 int node_cnt = 0; 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 } 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 } 76 75 77 76 return (node_cnt == gr.nodeNum()); … … 133 132 int esize = n <= 1 ? 0 : n; 134 133 135 ConstMap<Edge, int> cost_map(1); 136 TSP alg(g, cost_map); 134 TSP alg(g, constMap<Edge, int>(1)); 137 135 138 136 check(alg.run() == esize, alg_name + ": Wrong total cost"); … … 267 265 tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy"); 268 266 tspTestSmall<NearestInsertionTsp<ConstMap<Edge, int> > >("Nearest Insertion"); 269 tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > > 270 ("Farthest Insertion"); 271 tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > > 272 ("Cheapest Insertion"); 267 tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > >("Farthest Insertion"); 268 tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > >("Cheapest Insertion"); 273 269 tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion"); 274 270 tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides");
Note: See TracChangeset
for help on using the changeset viewer.