COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/tsp_test.cc

    r1092 r1106  
    6767
    6868  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    }
    7576
    7677  return (node_cnt == gr.nodeNum());
     
    132133    int esize = n <= 1 ? 0 : n;
    133134
    134     TSP alg(g, constMap<Edge, int>(1));
     135    ConstMap<Edge, int> cost_map(1);
     136    TSP alg(g, cost_map);
    135137
    136138    check(alg.run() == esize, alg_name + ": Wrong total cost");
     
    265267  tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy");
    266268  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");
    269273  tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion");
    270274  tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides");
Note: See TracChangeset for help on using the changeset viewer.