diff --git a/eo/src/eoGenOp.h b/eo/src/eoGenOp.h index a8143a9e..b24dad7d 100644 --- a/eo/src/eoGenOp.h +++ b/eo/src/eoGenOp.h @@ -48,6 +48,8 @@ the original population, is an instantiation of the next population and has often a selection function embedded in it to select new individuals. Note that the actual work is performed in the apply function. +AND that the apply function is responsible for invalidating +the object if necessary */ template class eoGenOp : public eoOp, public eoUF &, void> diff --git a/eo/src/eoInvalidateOps.h b/eo/src/eoInvalidateOps.h index f3a3b4cb..4643c727 100644 --- a/eo/src/eoInvalidateOps.h +++ b/eo/src/eoInvalidateOps.h @@ -37,6 +37,9 @@ the return type of the operator and invalidate the fitness of the individual. This functor is used in algorithms that work with straight eoMonOp, eoBinOp or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem */ template @@ -68,6 +71,9 @@ the return type of the operator and invalidate the fitness of the individual. This functor is used in algorithms that work with straight eoMonOp, eoBinOp or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem */ template @@ -99,6 +105,9 @@ the return type of the operator and invalidate the fitness of the individual. This functor is used in algorithms that work with straight eoMonOp, eoBinOp or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem */ template diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index b36c1d2c..5fba7fe5 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -205,6 +205,6 @@ std::vector rates; }; -// for General Ops, it's another story - +// for General Ops, it's another story - see eoOpCOntainer #endif diff --git a/eo/src/eoSGATransform.h b/eo/src/eoSGATransform.h index e06aad6d..47e2747a 100644 --- a/eo/src/eoSGATransform.h +++ b/eo/src/eoSGATransform.h @@ -84,9 +84,9 @@ template class eoSGATransform : public eoTransform }; private: - eoQuadOp& cross; + eoInvalidateQuadOp cross; double crossoverProba; - eoMonOp& mutate; + eoInvalidateMonOp mutate; double mutationProba; }; diff --git a/eo/src/es/eoEsStdevXOver.h b/eo/src/es/eoEsStdevXOver.h index c13adf6e..be5071e7 100644 --- a/eo/src/es/eoEsStdevXOver.h +++ b/eo/src/es/eoEsStdevXOver.h @@ -55,14 +55,7 @@ public : bool objectChanged = objectXOver(_eo1, _eo2); // as vector bool stdDevChanged = stdDevXOver(_eo1.stdevs, _eo2.stdevs); - /// Marc, I didn't change it, but if only the stdev has changed, - /// doesn't that mean that the fitness is stil valid. Maarten - if ( objectChanged || stdDevChanged ) - { - return true; - } - - return false; + return objectChanged; } private: