Fix building and installing package.
[genetic.git] / include / fitness / example.h
1 #ifndef __FITNESS_WSTI_H
2 #define __FITNESS_WSTI_H
3
4 #include <cmath>
5
6 #include "../gene.h"
7
8 using namespace std;
9
10 namespace genetic {
11     /**
12      * Just an example Fitness function.
13      */
14     template <typename _Chromosome, typename _Value = double>
15     class FitnessExample : public Fitness<_Chromosome, _Value> {
16     protected:
17         /*
18          * Chromosome is inherited so you don't have to declare usage of one
19          */
20         /* _Chromosome chromosome; */
21     public:
22         /**
23          * Example class constructor
24          */
25         FitnessExample(_Chromosome& _chromosome)
26             : Fitness<_Chromosome>(_chromosome) {
27         }
28
29         /**
30          * Some calculations should be passed here...
31          */
32         double calculate() {
33             return 0;
34         }
35     };
36 }
37
38 #endif /* __FITNESS_WSTI_H */