tree modifications
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@512 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
0d2b55437a
commit
61c0424eed
47 changed files with 395 additions and 458 deletions
24
trunk/paradiseo-mo/tutorial/examples/tsp/city_swap.cpp
Normal file
24
trunk/paradiseo-mo/tutorial/examples/tsp/city_swap.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "city_swap.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, 2002-2006
|
||||
|
||||
/* TEXT LICENCE
|
||||
|
||||
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 ;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue