Added wonderful test stuff
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@594 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
520b5a08e4
commit
31a487ec4a
23 changed files with 307 additions and 312 deletions
|
|
@ -37,7 +37,7 @@ public:
|
|||
|
||||
//!Function that indicates if the current move has not improved the fitness.
|
||||
/*!
|
||||
If the given fitness enables an improvement,
|
||||
If the given fitness enables an improvment,
|
||||
the move (moMove) and the fitness linked to this move are saved.
|
||||
|
||||
\param __move a move.
|
||||
|
|
@ -46,13 +46,16 @@ public:
|
|||
*/
|
||||
bool update (const M & __move, const Fitness & __fit)
|
||||
{
|
||||
if ((first_time) || (__fit > best_fit))
|
||||
|
||||
if (first_time || __fit > best_fit)
|
||||
{
|
||||
|
||||
best_fit = __fit;
|
||||
best_move = __move;
|
||||
|
||||
first_time = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -84,6 +87,7 @@ private:
|
|||
|
||||
//! The best fitness.
|
||||
Fitness best_fit;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue