update cpp

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@393 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
liefooga 2007-06-26 12:21:39 +00:00
commit 2e811f1e3d

View file

@ -10,13 +10,12 @@
*/
//-----------------------------------------------------------------------------
using namespace std;
#include <stdio.h>
#include <moeo>
#include <es/eoRealInitBounded.h>
#include <es/eoRealOp.h>
#include <moeoObjectiveVectorTraits.h>
using namespace std;
// the moeoObjectiveVectorTraits : minimizing 2 objectives
class Sch1ObjectiveVectorTraits : public moeoObjectiveVectorTraits
@ -26,7 +25,7 @@ public:
{
return true;
}
static unsigned nObjectives ()
static unsigned int nObjectives ()
{
return 2;
}
@ -67,8 +66,8 @@ public:
int main (int argc, char *argv[])
{
// parameters
unsigned POP_SIZE = 20;
unsigned MAX_GEN = 100;
unsigned int POP_SIZE = 20;
unsigned int MAX_GEN = 100;
double M_EPSILON = 0.01;
double P_CROSS = 0.25;
double P_MUT = 0.35;