* mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly

uninitialized variables.

* README.tmpl: Hint to regular Templates/README for details.

* README: Add documentation for adding new source-files.

* Makefile.am.src-tmpl (noinst_HEADERS): Add
(MyStruct_SOURCES): Move header files from here to the new
noinst_HEADERS variable.
This commit is contained in:
kuepper 2007-02-22 08:27:32 +00:00
commit 8acc9dcbce
7 changed files with 54 additions and 30 deletions

View file

@ -1,3 +1,16 @@
2007-02-22 Jochen Küpper <jochen@fhi-berlin.mpg.de>
* mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize
formerly uninitialized variables.
* README.tmpl: Hint to regular Templates/README for details.
* README: Add documentation for adding new source-files.
* Makefile.am.src-tmpl (noinst_HEADERS): Add
(MyStruct_SOURCES): Move header files from here to the new
noinst_HEADERS variable.
2007-01-16 Jochen Küpper <jochen@fhi-berlin.mpg.de> 2007-01-16 Jochen Küpper <jochen@fhi-berlin.mpg.de>
* README: Add instructions for bash. * README: Add instructions for bash.

View file

@ -1,12 +1,12 @@
bin_PROGRAMS = MyStruct bin_PROGRAMS = MyStruct
MyStruct_SOURCES = MyStructEA.cpp \ noinst_HEADERS = eoMyStruct.h \
eoMyStruct.h \
eoMyStructEvalFunc.h \ eoMyStructEvalFunc.h \
eoMyStructInit.h \ eoMyStructInit.h \
eoMyStructMutation.h \ eoMyStructMutation.h \
eoMyStructQuadCrossover.h eoMyStructQuadCrossover.h
MyStruct_SOURCES = MyStructEA.cpp
dnl Local Variables: dnl Local Variables:

View file

@ -4,10 +4,11 @@ a script createEOproject.sh to create a complete new EO project.
The template requires a complete installation of EO, that is, you must The template requires a complete installation of EO, that is, you must
have run "make install" in the build-directory. have run "make install" in the build-directory.
In particular, the C++ compiler must find the EO include files and the In particular, the C++ compiler must also know how to find the EO
linker must find the EO libraries. Most probably, that means that you include files and the linker must find the EO libraries. Most
have to set the variables CPLUS_INCLUDE_PATH and LIBRARY_PATH, i.e. probably, that means that you have to set the variables
for a standard installation and using tcsh: CPLUS_INCLUDE_PATH and LIBRARY_PATH, i.e. for a standard installation
and using tcsh:
setenv CPLUS_INCLUDE_PATH /usr/local/include/eo:"$CPLUS_INCLUDE_PATH" setenv CPLUS_INCLUDE_PATH /usr/local/include/eo:"$CPLUS_INCLUDE_PATH"
setenv LIBRARY_PATH /usr/local/lib:"$LIBRARY_PATH" setenv LIBRARY_PATH /usr/local/lib:"$LIBRARY_PATH"
@ -15,6 +16,7 @@ When running bash, use this:
export CPLUS_INCLUDE_PATH=/usr/local/include/eo:"$CPLUS_INCLUDE_PATH" export CPLUS_INCLUDE_PATH=/usr/local/include/eo:"$CPLUS_INCLUDE_PATH"
export LIBRARY_PATH=/usr/local/lib:"$LIBRARY_PATH" export LIBRARY_PATH=/usr/local/lib:"$LIBRARY_PATH"
You can freely move the created project around. However, whenever you You can freely move the created project around. However, whenever you
change the location of the source- or build-directories, you need to change the location of the source- or build-directories, you need to
run run
@ -24,4 +26,9 @@ in the source-directory and
in the build-directory (which might or might not be the same for you). in the build-directory (which might or might not be the same for you).
When you add additional source files to the project, simply add them
to the <myproj>_SOURCES variable in src/Makefile.am. Header files
should be added to noinst_HEADERS.
See README.manual for more details. See README.manual for more details.

View file

@ -1,17 +1,21 @@
This is an autogenerated EO project. This is an autogenerated EO project. It was (most probably) generated
It was (most probably) generated using the createEOproject.sh using the createEOproject.sh script in the
script in the ...eo-dir/tutorial/Templates directory. <eo-dir>/tutorial/Templates directory.
The project has a complete build-infrastructure based on The project has a complete build-infrastructure based on
automake/autoconf. You can simply run "make" in this directory to have automake/autoconf. You can simply run "make" in this directory to have
the program compiled. The executable build will be in src/. the program compiled. The executable build will be in src/. In case of
In case of problem during this step, please read the README file problem during this step, please read the README file in the
in the ...eo-dir/tutorial/Templates directory. ...eo-dir/tutorial/Templates directory.
After creation, the project should compile nicely - but of course After creation, the project should compile nicely - but of course the
the resulting program does noting at all but print a few silly lines. resulting program does noting at all but print a few silly lines.
Fill in the marked code-snippets in the files in src/ and you have a Fill in the marked code-snippets in the files in src/ and you have a
complete EA project (detailed explanations in EO Tutorial - Lesson 5). complete EA project (detailed explanations in EO Tutorial - Lesson 5).
Enjoy! Enjoy!
For details, for example on moving your project around or adding new
files, see <eo-dir>/tutorial/Templates/README.

View file

@ -46,7 +46,7 @@ public:
*/ */
bool operator()(GenotypeT & _genotype) bool operator()(GenotypeT & _genotype)
{ {
bool isModified; bool isModified(true);
// START code for mutation of the _genotype object // START code for mutation of the _genotype object
/** Requirement /** Requirement

View file

@ -49,7 +49,7 @@ public:
*/ */
bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2)
{ {
bool oneAtLeastIsModified; bool oneAtLeastIsModified(true);
// START code for crossover of _genotype1 and _genotype2 objects // START code for crossover of _genotype1 and _genotype2 objects
/** Requirement /** Requirement

View file

@ -46,7 +46,7 @@ public :
} }
void operator()(const eoPop<EOT>& _pop){ void operator()(const eoPop<EOT>& _pop){
double tmpStat; double tmpStat(0.);
// START Code for computing the statistics - in tmpStat // START Code for computing the statistics - in tmpStat
// tmpStat = blablabla // tmpStat = blablabla
// END Code for computing the statistics // END Code for computing the statistics