From 729fa74b42b62902ba2bb1409ba03e96035bb2fb Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 18 Jan 2000 13:43:39 +0000 Subject: [PATCH] I have change the do...while(terminator) into while(terminator){...}, because may be the termination condition is reached just atthe beginning (for instance 0 generations) --- eo/src/eoEasyEA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 49a905ebf..13f9e5367 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -57,7 +57,7 @@ template class eoEasyEA: public eoAlgo /// Apply one generation of evolution to the population. virtual void operator()(eoPop& pop) { - do { + while ( terminator( pop ) ){ try { step(pop); @@ -68,7 +68,7 @@ template class eoEasyEA: public eoAlgo s.append( " in eoEasyEA "); throw runtime_error( s ); } - } while ( terminator( pop ) ); + } } /// Class name.