3#include "SymbRegEvalOp.h"
11 for(uint i = 0; i < nSamples; i++) {
13 codomain.push_back(x + sin(x));
18 GenotypeP activeGenotype = state->getGenotypes()[0];
19 if(activeGenotype->getName() ==
"APGenotype")
38 if(APGenotype ==
true)
42 for(uint i = 0; i < nSamples; i++) {
44 if(APGenotype ==
true)
45 apg->setTerminalValue(tree,
"X", &domain[i]);
52 value += fabs(codomain[i] - result);
54 fitness->setValue(value);
Fitness for minimization problems.
FitnessP evaluate(IndividualP individual)
Evaluate a single individual. Method must create and return a Fitness object.
bool initialize(StateP)
Initialize the evaluator. Called before first evaluation occurs.
Analytical Programing genotype class - implements genotype as a vector of floating point values that ...
Tree class - implements genotype as a tree.
void setTerminalValue(std::string, void *)
Set a terminal's value.
void execute(void *)
Execute current tree.