diff --git a/eo/src/moo/eoNSGA_II_Eval.h b/eo/src/moo/eoNSGA_II_Eval.h index c3db19700..68a4cb2fc 100644 --- a/eo/src/moo/eoNSGA_II_Eval.h +++ b/eo/src/moo/eoNSGA_II_Eval.h @@ -19,7 +19,7 @@ class eoNSGA_II_Eval : public eoMOEval eoNSGA_II_Eval(eoEvalFunc& eval) : eoMOEval(eval) {} eoNSGA_II_Eval(eoPopEvalFunc& eval) : eoMOEval(eval) {} - void operator()(eoPop& parents, eoPop& offspring) { + virtual void operator()(eoPop& parents, eoPop& offspring) { eval(parents, offspring); std::vector pop; diff --git a/eo/src/moo/eoNSGA_IIa_Eval.h b/eo/src/moo/eoNSGA_IIa_Eval.h index f7e71b37b..c9131871a 100644 --- a/eo/src/moo/eoNSGA_IIa_Eval.h +++ b/eo/src/moo/eoNSGA_IIa_Eval.h @@ -18,7 +18,7 @@ class eoNSGA_IIa_Eval : public eoMOEval eoNSGA_IIa_Eval(eoPopEvalFunc& eval) : eoMOEval(eval) {} - void operator()(eoPop& parents, eoPop& offspring) { + virtual void operator()(eoPop& parents, eoPop& offspring) { eval(parents, offspring); std::vector pop; diff --git a/eo/src/moo/eoNSGA_I_Eval.h b/eo/src/moo/eoNSGA_I_Eval.h index 27733bd7a..56824dcfe 100644 --- a/eo/src/moo/eoNSGA_I_Eval.h +++ b/eo/src/moo/eoNSGA_I_Eval.h @@ -14,7 +14,7 @@ public : eoNSGA_I_Eval(double nicheWidth, eoEvalFunc& eval) : eoMOEval(eval), nicheSize(nicheWidth) {} eoNSGA_I_Eval(double nicheWidth, eoPopEvalFunc& eval) : eoMOEval(eval), nicheSize(nicheWidth) {} - void operator()(eoPop& parents, eoPop& offspring) { + virutal void operator()(eoPop& parents, eoPop& offspring) { eval(parents, offspring); std::vector pop;