2#include "TermMaxEvalOp.h"
7 uint *eval =
new uint(0);
8 state->getRegistry()->registerEntry(
"term.eval", (voidP) eval, ECF::UINT,
9 "max number of fitness evaluations (default: none)");
15 voidP sptr = state->getRegistry()->getEntry(
"term.eval");
16 nEvaluations_ = *((uint*) sptr.get());
18 if(state->getRegistry()->isModified(
"term.eval"))
27 if(state->getEvaluations() >= nEvaluations_) {
28 state->setTerminateCond();
29 ECF_LOG(state, 1,
"Termination: max evaluations reached (" + uint2str(nEvaluations_) +
")");
bool initialize(StateP)
Perform initialization. Called before Operator::operate. By default, if the return value is false,...
void registerParameters(StateP)
Register parameters with the Registry. Called before Operator::initialize.
bool operate(StateP)
perform the designated operation