move tsp source files
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@519 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
05a5b2a82f
commit
2dc84beef3
43 changed files with 0 additions and 9 deletions
20
trunk/paradiseo-peo/tutorial/examples/tsp/two_opt.cpp
Normal file
20
trunk/paradiseo-peo/tutorial/examples/tsp/two_opt.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// "two_opt.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, January 2006
|
||||
|
||||
/*
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#include "two_opt.h"
|
||||
|
||||
void TwoOpt :: operator () (Route & __route) {
|
||||
|
||||
unsigned i = 0;
|
||||
|
||||
while ((2 * i) < (second - first)) {
|
||||
|
||||
std :: swap (__route [first + i], __route [second - i]);
|
||||
i ++;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue