From f128fcd86f7bf7852539404271a13af881e03fc8 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Sat, 15 Oct 2005 09:05:57 +0000 Subject: [PATCH] Made eoGencontinue a ValueParam, so that it can be attached to a monitor --- eo/src/eoGenContinue.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index 42f6f5d7..436e583d 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -26,24 +26,26 @@ #define _eoGenContinue_h #include - +#include /** Generational continuator: continues until a number of generations is reached */ template< class EOT> -class eoGenContinue: public eoContinue +class eoGenContinue: public eoContinue, public eoValueParam { public: /// Ctor for setting a eoGenContinue( unsigned long _totalGens) - : repTotalGenerations( _totalGens ), + : eoValueParam(0, "Generations", "Generations"), + repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), thisGeneration(thisGenerationPlaceHolder), verbose(true) {}; /// Ctor for enabling the save/load the no. of generations counted eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) - : repTotalGenerations( _totalGens ), + : eoValueParam(0, "Generations", "Generations"), + repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), thisGeneration(_currentGen), verbose(true){}; @@ -51,6 +53,7 @@ public: * reached */ virtual bool operator() ( const eoPop& _vEO ) { thisGeneration++; + value() = thisGeneration; // std::cout << " [" << thisGeneration << "] "; if (thisGeneration >= repTotalGenerations) {