diff --git a/eo/src/do/make_algo_easea.h b/eo/src/do/make_algo_easea.h index cbcb9960a..84818e6c4 100644 --- a/eo/src/do/make_algo_easea.h +++ b/eo/src/do/make_algo_easea.h @@ -57,7 +57,6 @@ #include #include - /* * This function builds the algorithm (i.e. selection and replacement) * from existing continue (or checkpoint) and operators @@ -72,7 +71,7 @@ */ template -eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalFunc& _popeval, eoContinue& _continue, eoGenOp& _op) { // the selection eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t), Sequential(ordered/unordered) or EliteSequentialSelect", 'S', "Evolution Engine"); @@ -359,10 +358,30 @@ eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc /////////////////////////////// // now the eoEasyEA /////////////////////////////// - eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, *ptReplace); + eoAlgo *algo = new eoEasyEA(_continue, _popeval, *breed, *ptReplace); _state.storeFunctor(algo); // that's it! return *algo; } +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here +*/ +template +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + do_make_algo_scalar( _parser, _state, *(new eoPopLoopEval(_eval)), _continue, _op); +} + + + #endif