Added the eoPopEvalFunc class: gets the full parents + offspring populations

in order to evaluate them.
Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as
before (it is then encapsulated into an eoPopLoopEval that does the good
old loop on the offspring - or directly pass a full eoPopEvalFunc

Small modification also in make_op_es -> keyword "none" is now recognized
for one of the crossover of either object variables or stdev's
This commit is contained in:
evomarc 2001-07-03 12:56:44 +00:00
commit 88061395f1

View file

@ -102,8 +102,8 @@ eoGenOp<EOT> & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni
// ES crossover
eoValueParam<string>& crossTypeParam = _parser.createParam(string("global"), "crossType", "Type of ES recombination (global or standard)", 'C', "Variation Operators");
eoValueParam<string>& crossObjParam = _parser.createParam(string("discrete"), "crossObj", "Recombination of object variables (discrete or intermediate)", 'O', "Variation Operators");
eoValueParam<string>& crossStdevParam = _parser.createParam(string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate or discrete)", 'S', "Variation Operators");
eoValueParam<string>& crossObjParam = _parser.createParam(string("discrete"), "crossObj", "Recombination of object variables (discrete, intermediate or none)", 'O', "Variation Operators");
eoValueParam<string>& crossStdevParam = _parser.createParam(string("intermediate"), "crossStdev", "Recombination of mutation strategy parameters (intermediate, discrete or none)", 'S', "Variation Operators");
// The pointers: first the atom Xover
eoBinOp<double> *ptObjAtomCross = NULL;
@ -116,12 +116,16 @@ eoGenOp<EOT> & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealIni
ptObjAtomCross = new eoDoubleExchange;
else if (crossObjParam.value() == string("intermediate"))
ptObjAtomCross = new eoDoubleIntermediate;
else if (crossObjParam.value() == string("none"))
ptObjAtomCross = new eoBinCloneOp<double>;
else throw runtime_error("Invalid Object variable crossover type");
if (crossStdevParam.value() == string("discrete"))
ptStdevAtomCross = new eoDoubleExchange;
else if (crossStdevParam.value() == string("intermediate"))
ptStdevAtomCross = new eoDoubleIntermediate;
else if (crossStdevParam.value() == string("none"))
ptStdevAtomCross = new eoBinCloneOp<double>;
else throw runtime_error("Invalid mutation strategy parameter crossover type");
// and build the indi Xover