* whitespace cleanup
This commit is contained in:
parent
56c6edab04
commit
70e60a50d2
195 changed files with 1763 additions and 1873 deletions
|
|
@ -17,7 +17,7 @@ main file BitEA in tutorial/Lesson4 dir.
|
|||
Or you can wait until we do it :-)
|
||||
*/
|
||||
|
||||
// Miscilaneous include and declaration
|
||||
// Miscilaneous include and declaration
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
|
|
@ -29,17 +29,17 @@ using namespace std;
|
|||
// include here whatever specific files for your representation
|
||||
// Basically, this should include at least the following
|
||||
|
||||
/** definition of representation:
|
||||
/** definition of representation:
|
||||
* class eoOneMax MUST derive from EO<FitT> for some fitness
|
||||
*/
|
||||
#include "eoOneMax.h"
|
||||
|
||||
/** definition of initilizqtion:
|
||||
/** definition of initilizqtion:
|
||||
* class eoOneMaxInit MUST derive from eoInit<eoOneMax>
|
||||
*/
|
||||
#include "eoOneMaxInit.h"
|
||||
|
||||
/** definition of evaluation:
|
||||
/** definition of evaluation:
|
||||
* class eoOneMaxEvalFunc MUST derive from eoEvalFunc<eoOneMax>
|
||||
* and should test for validity before doing any computation
|
||||
* see tutorial/Templates/evalFunc.tmpl
|
||||
|
|
@ -51,19 +51,19 @@ using namespace std;
|
|||
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
// START fitness type: double or eoMaximizingFitness if you are maximizing
|
||||
// eoMinimizingFitness if you are minimizing
|
||||
typedef eoMaximizingFitness MyFitT ; // type of fitness
|
||||
typedef eoMaximizingFitness MyFitT ; // type of fitness
|
||||
// END fitness type
|
||||
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
||||
// Then define your EO objects using that fitness type
|
||||
typedef eoOneMax<MyFitT> Indi; // ***MUST*** derive from EO
|
||||
typedef eoOneMax<MyFitT> Indi; // ***MUST*** derive from EO
|
||||
|
||||
// create an initializer
|
||||
#include "make_genotype_OneMax.h"
|
||||
eoInit<Indi> & make_genotype(eoParser& _parser, eoState&_state, Indi _eo)
|
||||
{
|
||||
return do_make_genotype(_parser, _state, _eo);
|
||||
}
|
||||
}
|
||||
|
||||
// and the variation operaotrs
|
||||
#include "make_op_OneMax.h"
|
||||
|
|
@ -75,7 +75,7 @@ eoGenOp<Indi>& make_op(eoParser& _parser, eoState& _state, eoInit<Indi>& _init)
|
|||
// Use existing modules to define representation independent routines
|
||||
// These are parser-based definitions of objects
|
||||
|
||||
// how to initialize the population
|
||||
// how to initialize the population
|
||||
// it IS representation independent if an eoInit is given
|
||||
#include <do/make_pop.h>
|
||||
eoPop<Indi >& make_pop(eoParser& _parser, eoState& _state, eoInit<Indi> & _init)
|
||||
|
|
@ -92,7 +92,7 @@ eoContinue<Indi>& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCo
|
|||
|
||||
// outputs (stats, population dumps, ...)
|
||||
#include <do/make_checkpoint.h>
|
||||
eoCheckPoint<Indi>& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter<Indi>& _eval, eoContinue<Indi>& _continue)
|
||||
eoCheckPoint<Indi>& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter<Indi>& _eval, eoContinue<Indi>& _continue)
|
||||
{
|
||||
return do_make_checkpoint(_parser, _state, _eval, _continue);
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@ eoAlgo<Indi>& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc<I
|
|||
return do_make_algo_scalar(_parser, _state, _eval, _continue, _op);
|
||||
}
|
||||
|
||||
// simple call to the algo. stays there for consistency reasons
|
||||
// simple call to the algo. stays there for consistency reasons
|
||||
// no template for that one
|
||||
#include <do/make_run.h>
|
||||
// the instanciating fitnesses
|
||||
|
|
@ -141,7 +141,7 @@ int main(int argc, char* argv[])
|
|||
eoGenOp<Indi>& op = make_op(parser, state, init);
|
||||
|
||||
|
||||
//// Now the representation-independent things
|
||||
//// Now the representation-independent things
|
||||
//
|
||||
// YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT
|
||||
// unless you want to add specific statistics to the checkpoint
|
||||
|
|
|
|||
Reference in a new issue