COIN-OR::LEMON - Graph Library

Changeset 1270:dceba191c00d in lemon for lemon/insertion_tsp.h


Ignore:
Timestamp:
08/09/13 11:28:17 (6 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
1271:fb1c7da561ce, 1381:e0ccc1f0268f
Phase:
public
Message:

Apply unify-sources.sh to the source tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/insertion_tsp.h

    r1250 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2010
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    361361              Node u = _notused[i];
    362362              Cost min_cost = costDiff(_tour.back(), _tour.front(), u);
    363               int min_pos = 0;             
     363              int min_pos = 0;
    364364              for (unsigned int j=1; j<_tour.size(); ++j) {
    365365                Cost curr_cost = costDiff(_tour[j-1], _tour[j], u);
     
    391391            _notused[min_node] = _notused.back();
    392392            _notused.pop_back();
    393            
     393
    394394            // Insert the selected node into the tour
    395395            const int ipos = _ins_pos[sn];
     
    406406              Cost nc1 = costDiff(_tour[ipos_prev], _tour[ipos], u);
    407407              Cost nc2 = costDiff(_tour[ipos], _tour[ipos_next], u);
    408              
     408
    409409              if (nc1 <= curr_cost || nc2 <= curr_cost) {
    410410                // A new position is better than the old one
     
    421421                  // The minimum should be found again
    422422                  curr_cost = costDiff(_tour.back(), _tour.front(), u);
    423                   curr_pos = 0;             
     423                  curr_pos = 0;
    424424                  for (unsigned int j=1; j<_tour.size(); ++j) {
    425425                    Cost tmp_cost = costDiff(_tour[j-1], _tour[j], u);
     
    434434                }
    435435              }
    436              
     436
    437437              _ins_cost[u] = curr_cost;
    438438              _ins_pos[u] = curr_pos;
Note: See TracChangeset for help on using the changeset viewer.