COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/tsp_test.cc

    r1106 r1092  
    6767
    6868  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  }
    7675
    7776  return (node_cnt == gr.nodeNum());
     
    133132    int esize = n <= 1 ? 0 : n;
    134133
    135     ConstMap<Edge, int> cost_map(1);
    136     TSP alg(g, cost_map);
     134    TSP alg(g, constMap<Edge, int>(1));
    137135
    138136    check(alg.run() == esize, alg_name + ": Wrong total cost");
     
    267265  tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy");
    268266  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");
    273269  tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion");
    274270  tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides");
Note: See TracChangeset for help on using the changeset viewer.