00001 #ifndef FUNCTIONEVOLVER_H 00002 #define FUNCTIONEVOLVER_H 00003 00004 #include <../evolver/evolver.h> 00005 00006 class FunctionEvolver : public Evolver 00007 { 00008 public: 00009 FunctionEvolver(int nGenes, int nIndividuals, int nPopulations); 00010 00011 vec fitnessResult; 00012 vec x; 00013 vec result; 00014 void calculate(vec &coefficients); 00015 private: 00016 double fitness(vec &coefficients, int population, int individual); 00017 00018 00019 vec myFunction(); 00020 00021 }; 00022 00023 #endif // FUNCTIONEVOLVER_H