diff options
Diffstat (limited to '')
-rw-r--r-- | src/tests/maxima/fitnessfunctioneq.cpp | 5 | ||||
-rw-r--r-- | src/tests/maxima/fitnessfunctioneq.h | 1 | ||||
-rw-r--r-- | src/tests/maxima/main.cpp | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/maxima/fitnessfunctioneq.cpp b/src/tests/maxima/fitnessfunctioneq.cpp index 5694507..c64e87a 100644 --- a/src/tests/maxima/fitnessfunctioneq.cpp +++ b/src/tests/maxima/fitnessfunctioneq.cpp | |||
@@ -23,3 +23,8 @@ double FitnessFunctionEq::operator()( Genetic::Phenotype *pTest ) | |||
23 | return -1.8*(x*x*x*x) + 0.86*(x*x*x) + 4.0*(x*x); | 23 | return -1.8*(x*x*x*x) + 0.86*(x*x*x) + 4.0*(x*x); |
24 | } | 24 | } |
25 | 25 | ||
26 | Genetic::FitnessFunction *FitnessFunctionEq::clone() const | ||
27 | { | ||
28 | return new FitnessFunctionEq(); | ||
29 | } | ||
30 | |||
diff --git a/src/tests/maxima/fitnessfunctioneq.h b/src/tests/maxima/fitnessfunctioneq.h index 7139532..d1a64c5 100644 --- a/src/tests/maxima/fitnessfunctioneq.h +++ b/src/tests/maxima/fitnessfunctioneq.h | |||
@@ -10,6 +10,7 @@ public: | |||
10 | virtual ~FitnessFunctionEq(); | 10 | virtual ~FitnessFunctionEq(); |
11 | 11 | ||
12 | virtual double operator()( Genetic::Phenotype *pTest ); | 12 | virtual double operator()( Genetic::Phenotype *pTest ); |
13 | virtual Genetic::FitnessFunction *clone() const; | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | #endif | 16 | #endif |
diff --git a/src/tests/maxima/main.cpp b/src/tests/maxima/main.cpp index ec02a41..db11f66 100644 --- a/src/tests/maxima/main.cpp +++ b/src/tests/maxima/main.cpp | |||
@@ -23,6 +23,7 @@ int main( int argc, char *argv[] ) | |||
23 | 0.05 | 23 | 0.05 |
24 | ), | 24 | ), |
25 | new FitnessFunctionEq(), | 25 | new FitnessFunctionEq(), |
26 | 4, | ||
26 | 1000, | 27 | 1000, |
27 | .1, .1 | 28 | .1, .1 |
28 | ); | 29 | ); |