From 0409c65edff4712115c1c1f26a5f0c7b0b5d2931 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Thu, 26 Mar 2009 16:29:57 +0000 Subject: [PATCH] git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1575 331e1502-861f-0410-8da2-ba01fb791d7f --- .../branches/MOLS/src2/eoAmeliorationContinue.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contribution/branches/MOLS/src2/eoAmeliorationContinue.h b/contribution/branches/MOLS/src2/eoAmeliorationContinue.h index 0a25cfb48..098ca5ecf 100644 --- a/contribution/branches/MOLS/src2/eoAmeliorationContinue.h +++ b/contribution/branches/MOLS/src2/eoAmeliorationContinue.h @@ -13,13 +13,18 @@ class eoAmeliorationContinue: public eoContinue { public: - eoAmeliorationContinue(moeoDMLSArchive & _arch, unsigned int _neighborhoodSize) : arch(_arch),maxGen(_neighborhoodSize), neighborhoodSize(_neighborhoodSize), counter(0){} + eoAmeliorationContinue(moeoDMLSArchive & _arch, unsigned int _neighborhoodSize, bool _multiply) : arch(_arch),maxGen(_neighborhoodSize), neighborhoodSize(_neighborhoodSize), counter(0), multiply(_multiply){} // _pop must be an archive virtual bool operator() (const eoPop & _pop) { bool res; - maxGen=arch.size() * neighborhoodSize; + if(multiply){ + maxGen=arch.size() * neighborhoodSize; + } + else{ + maxGen = neighborhoodSize; + } if(arch.modified()) counter=0; else @@ -41,6 +46,7 @@ private: unsigned int maxGen; unsigned int neighborhoodSize; unsigned int counter; + bool multiply; };