paradiseo/trunk/paradiseo-peo/tutorial/examples/tsp/city_swap.cpp
legrand 2dc84beef3 move tsp source files
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@519 331e1502-861f-0410-8da2-ba01fb791d7f
2007-07-05 08:37:11 +00:00

21 lines
366 B
C++

// "city_swap.cpp"
// (c) OPAC Team, LIFL, 2002
/*
Contact: paradiseo-help@lists.gforge.inria.fr
*/
#include <utils/eoRNG.h>
#include "city_swap.h"
bool CitySwap :: operator () (Route & __route) {
std :: swap (__route [rng.random (__route.size ())],
__route [rng.random (__route.size ())]) ;
__route.invalidate () ;
return true ;
}