Corrected a few small problems - including dependencies in Makefile

thanks to Sebastiao CORREIA for pointing them out
This commit is contained in:
evomarc 2001-10-17 17:49:54 +00:00
commit 03308af599
4 changed files with 32 additions and 10 deletions

View file

@ -4,6 +4,17 @@
.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I./util -Wall -g -c $*.cpp
# local sources
LOCAL_SOURCES = MyStructEA.cpp \
eoMyStruct.h \
eoMyStructEvalFunc.h \
eoMyStructInit.h \
eoMyStructMutation.h \
eoMyStructQuadCrossover.h \
make_genotype_MyStruct.h \
make_op_MyStruct.h
# START eventually modify the name of EO dir
DIR_EO = ../../src
@ -22,4 +33,6 @@ all : $(ALL)
clean : ; /bin/rm *.o $(ALL)
########## local dependencies
AppliEA.o : $(LOCAL_SOURCES)

View file

@ -51,10 +51,13 @@ using namespace std;
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// START fitness type: double or eoMaximizingFitness if you are maximizing
// eoMinimizingFitness if you are minimizing
typedef eoMyStruct<double> Indi; // ***MUST*** derive from EO
typedef eoMinimizingFitness MyFitT ; // type of fitness
// END fitness type
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Then define your EO objects using that fitness type
typedef eoMyStruct<MyFitT> Indi; // ***MUST*** derive from EO
// create an initializer
#include "make_genotype_MyStruct.h"
eoInit<Indi> & make_genotype(eoParameterLoader& _parser, eoState&_state, Indi _eo)

View file

@ -30,18 +30,23 @@ First, let's choose a name: let's call the new EO class eoAppli.
All newly created classes will be named eoAppliXXX (in the file
eoAppliXXX)
1- choose a directory name for your application in the tutorial dir,
"parallel" to the LessonX dirs (though any name can do, of course, we
will suppose its full name, from the / root dir, is APPLICATION in
what follows)
1- cd to the tutorial dir
2- cd to the tutorial/Templates dir
2- create the directory for your application (let's assume you call it
APPLICATION): type in
3- run the helper script create.sh with the following arguments
create.sh Appli APPLICATION
mkdir APPLICATION
4- cd to the APPLICATION dir. You should see there the following
files:
3- go to the Templates dir
cd Templates
and run the helper script create.sh with the following arguments
./create.sh Appli ../APPLICATION
4- cd to the APPLICATION dir (cd ../APPLICATION).
You should see there the following files:
AppliEA.cpp the main file, includes all other, to be compiled
Makefile with default target eoAppliEA
eoAppli.h class eoAppli<FitT>, FitT = template fitness

View file

@ -40,6 +40,7 @@ public:
// END Code of default Ctor of an eoMyStruct object
}
virtual string className() const { return "eoMyStruct"; }
/** printing... */
void printOn(ostream& os) const