00001 // "two_opt_next.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_next.h" 00010 #include "node.h" 00011 00012 bool TwoOptNext :: operator () (TwoOpt & __move, const Route & __route) { 00013 00014 if (__move.first == numNodes - 1 && __move.second == numNodes - 1) 00015 return false; 00016 00017 else { 00018 00019 __move.second ++; 00020 if (__move.second == numNodes) { 00021 00022 __move.first ++; 00023 __move.second = __move.first; 00024 } 00025 return true ; 00026 } 00027 }
1.4.7