From 11b3eabfca8534cfa440da8d16b7d206dd434901 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 17 Oct 2001 17:48:50 +0000 Subject: [PATCH] Corrected a few small problems - thanks to Sebastiao CORREIA for pointing them out --- eo/tutorial/html/eoBottomUp.html | 7 +++- eo/tutorial/html/eoProgramming.html | 64 ++++++++++++++--------------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/eo/tutorial/html/eoBottomUp.html b/eo/tutorial/html/eoBottomUp.html index 9589a8d90..399abc82b 100644 --- a/eo/tutorial/html/eoBottomUp.html +++ b/eo/tutorial/html/eoBottomUp.html @@ -16,7 +16,7 @@ hints - EO documentation

EO - Component-Based approach

-


Congratualtions - You have chosen the component-based approach!  +


Congratulations - You have chosen the component-based approach!  From here you will be allowed to browse into the different components of an Evolutionary Algorithm, and to see how to program your favorite using the EO library. @@ -36,13 +36,16 @@ to go directly to the corresponding section of the tutorial. - + + + + diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index f1cc7bc0e..b5bca2866 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -6,12 +6,12 @@ EO Programming guide -General: Tutorial +General: Tutorial main page - -Algorithm-Based -- Component-Based -- Programming -hints - EO +Algorithm-Based +- Component-Based +- Programming +hints - EO documentation


Local: Templates @@ -34,10 +34,10 @@ naming variables in algebra: you can write a lot of equations involving some variable $x$ without knowing even it if will be an integer or a float (or a matrix or ...). The main basic type that is templatized in EO is 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) +F that can be anything. The definition for that is (see EO.h)

template<F> class EO

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

template<F> class eoBin : public EO<F>
{ ... code for eoBin  };

and then use it in your application as @@ -71,15 +71,15 @@ a hierarchy of functions with defaults behaviors and specialized sub-functions ... -Functors are so intimately linked to EO that a base class (eoFunctorBase) +Functors are so intimately linked to EO that a base class (eoFunctorBase) has been designed to hold all functors. This base class is itself divided into three derived class. These classes tell you immediately what kind of arguments the operator() method requires and what kind of result it produces. See EO -conventions, and the inheritance +conventions, and the inheritance diagram of class eoFunctorBase.
For a more complete introduction to functors, with detailed discussion, -go to the STL +go to the STL documentation - as STL also heavily relies on functors, and the eoFunctorBase paradigm is borrowed from there.

Functors: Example: @@ -118,7 +118,7 @@ method. is for arity-zero functors, i.e.  their operator() method does not require any argument. It has a single template parameter, the return type of the operator() -method. For instance,  eoMonitor  +method. For instance,  eoMonitor  are eoF's that return an eoMonitor &. @@ -127,7 +127,7 @@ that return an eoMonitor &operator() method requires one argument. It has two template parameters, the type of the argument and the return type of the operator() -method. For instance,  eoMonOp's +method. For instance,  eoMonOp's are eoUF's that take as argument an EOT & and return void @@ -138,14 +138,14 @@ and return voidoperator() method requires two arguments. It has three template parameters, the types of the arguments and the return type of the operator() -method. For instance,  eoBinOp's +method. For instance,  eoBinOp's are eoBF's that take as arguments a const EOT & and an EOT &, and return void . -Now go back to the inheritance +Now go back to the inheritance diagram of class eoFunctorBase, and guess the interface for all functors!

Note: for @@ -153,7 +153,7 @@ obvious simplicity reasons, we very often omit the reference to the