I have separated the include files into
eo everything that is general to any representation es.h everything about real representation (in es dir) ga.h everything related to bitstring representation (in ga dir) To be continued by gp.h, and ... This has lead to some slight modifications in test file eobin and all tutorial examples files...
This commit is contained in:
parent
8aad8f547c
commit
41ff11bd7f
13 changed files with 51 additions and 56 deletions
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
// REPRESENTATION
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include the corresponding file
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
// define your individuals
|
||||
typedef eoBin<double> Indi; // A bitstring with fitness double
|
||||
|
||||
|
|
@ -87,6 +89,11 @@ void main_function(int argc, char **argv)
|
|||
// Print (sorted) intial population (raw printout)
|
||||
cout << "Initial Population" << endl;
|
||||
cout << pop;
|
||||
// shuffle - this is a test
|
||||
pop.shuffle();
|
||||
// Print (sorted) intial population (raw printout)
|
||||
cout << "Shuffled Population" << endl;
|
||||
cout << pop;
|
||||
|
||||
// ENGINE
|
||||
/////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
// REPRESENTATION
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include the corresponding file
|
||||
#include <es.h> // real-representation & operators
|
||||
// define your individuals
|
||||
typedef eoReal<double> Indi;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
#include <eo>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include the corresponding file
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
// define your individuals
|
||||
typedef eoBin<double> Indi; // A bitstring with fitness double
|
||||
|
||||
|
|
|
|||
Reference in a new issue