- Main Page
- Classes
- Files

- Search for |

# two_opt.cpp

    00001 // "two_opt.cpp"
    00002
    00003 // (c) OPAC Team, LIFL, January 2006
    00004
    00005 /*
    00006    Contact: paradiseo-help@lists.gforge.inria.fr
    00007 */
    00008
    00009 #include "two_opt.h"
    00010
    00011 void TwoOpt :: operator () (Route & __route) {
    00012
    00013   unsigned i = 0;
    00014
    00015   while ((2 * i) < (second - first)) {
    00016
    00017     std :: swap (__route [first + i], __route [second - i]);
    00018     i ++;
    00019   }
    00020 }