X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=src%2Ffitness%2Fexample.h;fp=src%2Ffitness%2Fexample.h;h=46d89075762e44722153c9c0f8afa1d46182fe90;hb=1014b8296cc38f408212d385f036cc78e9c66cce;hp=0000000000000000000000000000000000000000;hpb=7faf2455f25ec5451ce2aebd792017f9118040ec;p=genetic.git diff --git a/src/fitness/example.h b/src/fitness/example.h new file mode 100644 index 0000000..46d8907 --- /dev/null +++ b/src/fitness/example.h @@ -0,0 +1,32 @@ +#ifndef __FITNESS_WSTI_H +#define __FITNESS_WSTI_H + +#include + +#include "../gene.h" + +using namespace std; + +namespace genetic { + /** + * Just an example Fitness function. + */ + template < typename _Chromosome > + class FitnessExample { + protected: + _Chromosome chromosome; + public: + FitnessExample(_Chromosome& _chromosome) + : chromosome(_chromosome.get()) { + } + + /* + * Some calculations here... + */ + double calculate() { + return 0; + } + }; +} + +#endif /* __FITNESS_WSTI_H */