ECF 1.5
main.cpp
1#include <ecf/ECF.h>
2#include "FunctionMinEvalOp.h"
3
4
5int main(int argc, char **argv)
6{
7 StateP state (new State);
8
9 // set the evaluation operator
10 state->setEvalOp(new FunctionMinEvalOp);
11
12 state->initialize(argc, argv);
13 state->run();
14
15 // after the evolution: show best
16 std::vector<IndividualP> hof = state->getHoF()->getBest();
17 IndividualP ind = hof[0];
18 ind->fitness = state->getEvalOp()->evaluate(ind);
19 std::cout << ind->toString();
20
21 return 0;
22}
Function minimization evaluation class.
State class - backbone of the framework.
Definition: State.h:39