two_opt_next.cpp

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
00002 
00003 // "two_opt_next.cpp"
00004 
00005 // (c) OPAC Team, LIFL, 2003-2006
00006 
00007 /* LICENCE TEXT
00008    
00009    Contact: paradiseo-help@lists.gforge.inria.fr
00010 */
00011 
00012 #include "two_opt_next.h"
00013 #include "graph.h"
00014 
00015 bool TwoOptNext :: operator () (TwoOpt & __move, const Route & __route) 
00016 {
00017   if (__move.first == Graph :: size () - 4 && __move.second == __move.first + 2)
00018     {
00019       return false ;
00020     }
00021   else 
00022     {
00023       __move.second ++ ;
00024       if (__move.second == Graph :: size () - 1) 
00025         {
00026           __move.first ++ ;
00027           __move.second = __move.first + 2 ;
00028         }
00029       
00030       return true ;
00031     }
00032 }

Generated on Thu Sep 20 11:30:28 2007 for ParadisEO-MOMovingObjects by  doxygen 1.5.2