From 6546cb8c52707f55527de6ba4d5d36eac9718893 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 9 Feb 2002 05:01:48 +0000 Subject: [PATCH] Corrected a serious bug in eoUniformMutation (double declaration of bool HasChanged) The consequence was that if that mutation was the only operator called on some individual, it was not invalidated, and hence its fitness not recomputed!!! --- eo/src/es/eoRealOp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/eo/src/es/eoRealOp.h b/eo/src/es/eoRealOp.h index 06528cc2..01d7d6e8 100644 --- a/eo/src/es/eoRealOp.h +++ b/eo/src/es/eoRealOp.h @@ -111,7 +111,6 @@ template class eoUniformMutation: public eoMonOp if (_eo.size() != bounds.size()) throw runtime_error("Invalid size of indi in eoUniformMutation"); - bool hasChanged=false; for (unsigned lieu=0; lieu<_eo.size(); lieu++) if (rng.flip(p_change[lieu])) {