test/tsp_test.cc
changeset 1409 c89884c1737b
parent 1271 fb1c7da561ce
equal deleted inserted replaced
3:968cd1383719 4:3c72a6ddc49f
   130   for (int n = 0; n <= 5; ++n) {
   130   for (int n = 0; n <= 5; ++n) {
   131     FullGraph g(n);
   131     FullGraph g(n);
   132     unsigned nsize = n;
   132     unsigned nsize = n;
   133     int esize = n <= 1 ? 0 : n;
   133     int esize = n <= 1 ? 0 : n;
   134 
   134 
   135     TSP alg(g, constMap<Edge, int>(1));
   135     ConstMap<Edge, int> cost_map(1);
       
   136     TSP alg(g, cost_map);
   136 
   137 
   137     check(alg.run() == esize, alg_name + ": Wrong total cost");
   138     check(alg.run() == esize, alg_name + ": Wrong total cost");
   138     check(alg.tourCost() == esize, alg_name + ": Wrong total cost");
   139     check(alg.tourCost() == esize, alg_name + ": Wrong total cost");
   139 
   140 
   140     std::list<Node> list1(nsize), list2;
   141     std::list<Node> list1(nsize), list2;