From 7879a70248bfd02c840678d0b31215be6daefc96 Mon Sep 17 00:00:00 2001 From: jboisson Date: Tue, 13 Jan 2009 14:17:59 +0000 Subject: [PATCH] moImprBestFitAspirCrit.h has been updated, a bug ??? Strange, several line codes do not correspond with the associated commentaries... it must be tested git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1325 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h b/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h index bd6164118..386115713 100755 --- a/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h +++ b/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h @@ -68,7 +68,7 @@ class moImprBestFitAspirCrit:public moAspirCrit < M > \param _move A move. \param _fitness A fitness linked to the move. - \return true The first time and if _fitntess > best_fitness, else false. + \return true The first time and if _fitness > best_fitness, else false. */ bool operator () (const M & _move, const Fitness & _fitness) { @@ -80,14 +80,12 @@ class moImprBestFitAspirCrit:public moAspirCrit < M > return true; } - if (_fitness < best_fitness) + if (_fitness > best_fitness) { - return false; + best_fitness = _fitness; + return true; } - - best_fitness = _fitness; - - return true; + return false; } private: