From 98f763466a6f12797005a203e695c02ee405ded0 Mon Sep 17 00:00:00 2001 From: maartenkeijzer Date: Tue, 4 Sep 2007 07:47:46 +0000 Subject: [PATCH] Added reinitialization of fitness when fitness is invalidated. Needed this to clear worths in multi-objective case --- eo/src/EO.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/src/EO.h b/eo/src/EO.h index fae793ae..bb26ac1e 100644 --- a/eo/src/EO.h +++ b/eo/src/EO.h @@ -41,7 +41,7 @@ be minimized with a proper definition of the < operator. The fitness object must have, besides an void ctor, a copy ctor. */ -template class EO: public eoObject, public eoPersistent +template class EO: public eoObject, public eoPersistent { public: typedef F Fitness; @@ -64,7 +64,7 @@ public: } // Set fitness as invalid. - void invalidate() { invalidFitness = true; } + void invalidate() { invalidFitness = true; repFitness = Fitness(); } /** Set fitness. At the same time, validates it. * @param _fitness New fitness value.