* 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:
parent
4a9c5127f8
commit
8acc9dcbce
7 changed files with 54 additions and 30 deletions
|
|
@ -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>
|
||||
|
||||
* README: Add instructions for bash.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
bin_PROGRAMS = MyStruct
|
||||
|
||||
MyStruct_SOURCES = MyStructEA.cpp \
|
||||
eoMyStruct.h \
|
||||
noinst_HEADERS = eoMyStruct.h \
|
||||
eoMyStructEvalFunc.h \
|
||||
eoMyStructInit.h \
|
||||
eoMyStructMutation.h \
|
||||
eoMyStructQuadCrossover.h
|
||||
|
||||
MyStruct_SOURCES = MyStructEA.cpp
|
||||
|
||||
|
||||
dnl Local Variables:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
have run "make install" in the build-directory.
|
||||
|
||||
In particular, the C++ compiler must find the EO include files and the
|
||||
linker must find the EO libraries. Most probably, that means that you
|
||||
have to set the variables CPLUS_INCLUDE_PATH and LIBRARY_PATH, i.e.
|
||||
for a standard installation and using tcsh:
|
||||
In particular, the C++ compiler must also know how to find the EO
|
||||
include files and the linker must find the EO libraries. Most
|
||||
probably, that means that you have to set the variables
|
||||
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 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 LIBRARY_PATH=/usr/local/lib:"$LIBRARY_PATH"
|
||||
|
||||
|
||||
You can freely move the created project around. However, whenever you
|
||||
change the location of the source- or build-directories, you need to
|
||||
run
|
||||
|
|
@ -24,4 +26,9 @@ in the source-directory and
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
This is an autogenerated EO project.
|
||||
It was (most probably) generated using the createEOproject.sh
|
||||
script in the ...eo-dir/tutorial/Templates directory.
|
||||
This is an autogenerated EO project. It was (most probably) generated
|
||||
using the createEOproject.sh script in the
|
||||
<eo-dir>/tutorial/Templates directory.
|
||||
|
||||
The project has a complete build-infrastructure based on
|
||||
automake/autoconf. You can simply run "make" in this directory to have
|
||||
the program compiled. The executable build will be in src/.
|
||||
In case of problem during this step, please read the README file
|
||||
in the ...eo-dir/tutorial/Templates directory.
|
||||
the program compiled. The executable build will be in src/. In case of
|
||||
problem during this step, please read the README file in the
|
||||
...eo-dir/tutorial/Templates directory.
|
||||
|
||||
After creation, the project should compile nicely - but of course
|
||||
the resulting program does noting at all but print a few silly lines.
|
||||
After creation, the project should compile nicely - but of course the
|
||||
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
|
||||
complete EA project (detailed explanations in EO Tutorial - Lesson 5).
|
||||
|
||||
Enjoy!
|
||||
|
||||
|
||||
For details, for example on moving your project around or adding new
|
||||
files, see <eo-dir>/tutorial/Templates/README.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
*/
|
||||
bool operator()(GenotypeT & _genotype)
|
||||
{
|
||||
bool isModified;
|
||||
bool isModified(true);
|
||||
// START code for mutation of the _genotype object
|
||||
|
||||
/** Requirement
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
*/
|
||||
bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2)
|
||||
{
|
||||
bool oneAtLeastIsModified;
|
||||
bool oneAtLeastIsModified(true);
|
||||
// START code for crossover of _genotype1 and _genotype2 objects
|
||||
|
||||
/** Requirement
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public :
|
|||
}
|
||||
|
||||
void operator()(const eoPop<EOT>& _pop){
|
||||
double tmpStat;
|
||||
double tmpStat(0.);
|
||||
// START Code for computing the statistics - in tmpStat
|
||||
// tmpStat = blablabla
|
||||
// END Code for computing the statistics
|
||||
|
|
|
|||
Reference in a new issue