From 893204f8f1293644092ff1541ac2234af0faa44d Mon Sep 17 00:00:00 2001 From: evomarc Date: Thu, 25 Dec 2008 16:01:57 +0000 Subject: [PATCH] Fixing a small glitch that was giving wrong clues to newcomers ... Thanks to Christophe-Marie Duquesne for the post --- eo/tutorial/html/eoProgramming.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index a986b341a..64fca549f 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -36,13 +36,13 @@ the fitness: an EO object is some object which has a fitness of some type F that can be anything. The definition for that is (see EO.h)

template<class F> class EO

The idea is that, later in your code, you can define a class as follows -(see for instance  eoBit.h). -

template<class F> class eoBit : public +(see for instance  eoOneMax.h - or check Lesson 5 for more details). +

template<class F> class eoOneMax : public EO<F> -
{ ... code for eoBit  }; +
{ ... code for eoOneMax  };

and then use it in your application as -

eoBit<double> myeoBit; -

declares an object of type eoBin which has as fitness a double. +

eoOneMax<double> myeoBit; +

declares an object of type eoOneMax which has as fitness a double.

Whereas the advantages are obvious (writing generic reusable code instead of having to rewrite the same pieces of code for different types), there