00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- 00002 00003 // "city_swap.cpp" 00004 00005 // (c) OPAC Team, LIFL, 2002-2006 00006 00007 /* TEXT LICENCE 00008 00009 Contact: paradiseo-help@lists.gforge.inria.fr 00010 */ 00011 00012 #include <utils/eoRNG.h> 00013 00014 #include "city_swap.h" 00015 00016 bool CitySwap :: operator () (Route & __route) { 00017 00018 std :: swap (__route [rng.random (__route.size ())], 00019 __route [rng.random (__route.size ())]) ; 00020 00021 __route.invalidate () ; 00022 00023 return true ; 00024 }
1.5.2