* whitespace cleanup

This commit is contained in:
Caner Candan 2011-05-05 17:15:10 +02:00
commit 70e60a50d2
195 changed files with 1763 additions and 1873 deletions

View file

@ -1,6 +1,5 @@
The Evolving Distribution Objects framework (EDO) is a template-based,
The Evolving Distribution Objects framework (EDO) is a template-based, ANSI-C++ evolutionary computation library which helps you to write your
ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
GNU LESSER GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999 Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc. Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@ -10,7 +10,7 @@
as the successor of the GNU Library Public License, version 2, hence as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.] the version number 2.1.]
Preamble Preamble
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must former contains code derived from the library, whereas the latter must
be combined with the library in order to run. be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other 0. This License Agreement applies to any software library or other
@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing of all derivatives of our free software and of promoting the sharing
and reuse of software generally. and reuse of software generally.
NO WARRANTY NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@ -455,9 +455,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that possible use to the public, we recommend making it free software that

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -25,4 +25,3 @@ Authors:
*/ */
#include "edo" #include "edo"

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -60,4 +60,3 @@ private:
}; };
#endif // !_edoBounderRng_h #endif // !_edoBounderRng_h

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -39,16 +39,16 @@ public:
void operator()( EOT& sol ) void operator()( EOT& sol )
{ {
unsigned int size = sol.size(); unsigned int size = sol.size();
assert(size > 0); assert(size > 0);
for (unsigned int d = 0; d < size; ++d) { for (unsigned int d = 0; d < size; ++d) {
if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) {
// use EO's global "rng" // use EO's global "rng"
sol[d] = rng.uniform( this->min()[d], this->max()[d] ); sol[d] = rng.uniform( this->min()[d], this->max()[d] );
} }
} // for d in size } // for d in size
} }
}; };

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -108,7 +108,7 @@ public:
*/ */
void operator ()(eoPop< EOT > & pop) void operator ()(eoPop< EOT > & pop)
{ {
assert(pop.size() > 0); assert(pop.size() > 0);
//double temperature = _initial_temperature; //double temperature = _initial_temperature;

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -108,7 +108,7 @@ public:
*/ */
void operator ()(eoPop< EOT > & pop) void operator ()(eoPop< EOT > & pop)
{ {
assert(pop.size() > 0); assert(pop.size() > 0);
double temperature = _initial_temperature; double temperature = _initial_temperature;

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -38,4 +38,3 @@ public:
}; };
#endif // !_edoModifier_h #endif // !_edoModifier_h

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -42,4 +42,3 @@ public:
}; };
#endif // !_edoModifierMass_h #endif // !_edoModifierMass_h

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -44,4 +44,3 @@ public:
}; };
#endif // !_edoNormalMonoCenter_h #endif // !_edoNormalMonoCenter_h

View file

@ -1,8 +1,8 @@
// (c) Thales group, 2010 // (c) Thales group, 2010
/* /*
Authors: Authors:
Johann Dreo <johann.dreo@thalesgroup.com> Johann Dreo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com> Caner Candan <caner.candan@thalesgroup.com>
*/ */
#ifndef _edoNormalMulti_h #ifndef _edoNormalMulti_h

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -74,7 +74,7 @@ public:
{ {
AtomType mean = distrib.mean()[i]; AtomType mean = distrib.mean()[i];
AtomType variance = distrib.variance()[i]; AtomType variance = distrib.variance()[i];
AtomType random = rng.normal(mean, variance); AtomType random = rng.normal(mean, variance);
assert(variance >= 0); assert(variance >= 0);

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* /*
The Evolving Distribution Objects framework (EDO) is a template-based, The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms. own estimation of distribution algorithms.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or

View file

@ -10,9 +10,9 @@ from numpy import arange
if __name__ == '__main__': if __name__ == '__main__':
for p1 in list(arange(0.1, 1.1, 0.1)): for p1 in list(arange(0.1, 1.1, 0.1)):
for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)): for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)):
for p3 in list(arange(0.1, 1.1, 0.1)): for p3 in list(arange(0.1, 1.1, 0.1)):
gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3)
cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen ) cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen )
print cmd print cmd
system( cmd ) system( cmd )

View file

@ -1274,11 +1274,11 @@ Date: Thu Feb 22 08:27:32 2007 +0000
* mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly
uninitialized variables. uninitialized variables.
* README.tmpl: Hint to regular Templates/README for details. * README.tmpl: Hint to regular Templates/README for details.
* README: Add documentation for adding new source-files. * README: Add documentation for adding new source-files.
* Makefile.am.src-tmpl (noinst_HEADERS): Add * Makefile.am.src-tmpl (noinst_HEADERS): Add
(MyStruct_SOURCES): Move header files from here to the new (MyStruct_SOURCES): Move header files from here to the new
noinst_HEADERS variable. noinst_HEADERS variable.
@ -1315,7 +1315,7 @@ Date: Sun Jan 14 18:56:31 2007 +0000
for automake finding the scripts of eo itself if we run it in a embedded for automake finding the scripts of eo itself if we run it in a embedded
subdirectory. subdirectory.
(COPYING, INSTALL): create. (COPYING, INSTALL): create.
* README: State more explicitly what a "complete installation" means. * README: State more explicitly what a "complete installation" means.
Give build-instructions for moved directories. Give build-instructions for moved directories.
@ -1359,9 +1359,9 @@ Author: kuepper <kuepper>
Date: Mon Dec 18 11:17:55 2006 +0000 Date: Mon Dec 18 11:17:55 2006 +0000
* TODO.html, README.html: Remove these old files. * TODO.html, README.html: Remove these old files.
* AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release.
* eo.cfg (PROJECT_NUMBER): Bump version to 1.0 * eo.cfg (PROJECT_NUMBER): Bump version to 1.0
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -1373,7 +1373,7 @@ Author: kuepper <kuepper>
Date: Sun Dec 17 22:59:53 2006 +0000 Date: Sun Dec 17 22:59:53 2006 +0000
* README: Better links to Templates/ * README: Better links to Templates/
* configure.in: Bump version to 1.0-beta2. * configure.in: Bump version to 1.0-beta2.
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -1402,11 +1402,11 @@ Date: Sat Dec 16 21:55:03 2006 +0000
* EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use
correct names for includes. correct names for includes.
* README.manual: This is a copy of the old README. * README.manual: This is a copy of the old README.
* README: Describe the new way and setup of creating a new EO project. * README: Describe the new way and setup of creating a new EO project.
* createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl:
* configure.ac.tmpl: New files to create a standalone EO project from * configure.ac.tmpl: New files to create a standalone EO project from
templates. templates.
@ -1435,7 +1435,7 @@ Author: kuepper <kuepper>
Date: Mon Dec 4 22:27:41 2006 +0000 Date: Mon Dec 4 22:27:41 2006 +0000
* Makefile.am: Add t-eoRNG * Makefile.am: Add t-eoRNG
* t-eoRNG.cpp: Start test for random number generator. * t-eoRNG.cpp: Start test for random number generator.
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -1472,11 +1472,11 @@ Author: kuepper <kuepper>
Date: Sun Dec 3 10:41:54 2006 +0000 Date: Sun Dec 3 10:41:54 2006 +0000
* mainpage.html: update, add link to Niko Hansen's comparison * mainpage.html: update, add link to Niko Hansen's comparison
* README: Add more specific note about tutorial. * README: Add more specific note about tutorial.
* configure.in: Bump version to 1.0-beta1 * configure.in: Bump version to 1.0-beta1
* tutorial/Makefile.am: Add all necessary files, including html and * tutorial/Makefile.am: Add all necessary files, including html and
Templates to distribution. Templates to distribution.
@ -1517,13 +1517,13 @@ Author: kuepper <kuepper>
Date: Sat Dec 2 10:18:57 2006 +0000 Date: Sat Dec 2 10:18:57 2006 +0000
* eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned.
* eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp.
* t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this
results in escape-codes (^@) to be printed at runtime and is not results in escape-codes (^@) to be printed at runtime and is not
necessary anyway. necessary anyway.
* test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to
avoid compiler warnings. avoid compiler warnings.
@ -1531,7 +1531,7 @@ Author: kuepper <kuepper>
Date: Sat Dec 2 09:39:13 2006 +0000 Date: Sat Dec 2 09:39:13 2006 +0000
* eoRNG.h: Cleanup docs and document /all/ members. * eoRNG.h: Cleanup docs and document /all/ members.
* eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp.
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -1548,9 +1548,9 @@ Author: kuepper <kuepper>
Date: Fri Dec 1 20:08:51 2006 +0000 Date: Fri Dec 1 20:08:51 2006 +0000
* Makefile.am: Update for release-distribution. * Makefile.am: Update for release-distribution.
* Makefile.am: Add missing CMA header for distribution. * Makefile.am: Add missing CMA header for distribution.
* Makefile.am: Add missing header for distribution. * Makefile.am: Add missing header for distribution.
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -1603,7 +1603,7 @@ Author: kuepper <kuepper>
Date: Thu Nov 16 12:52:46 2006 +0000 Date: Thu Nov 16 12:52:46 2006 +0000
* configure.in (AC_DEBUG): add test * configure.in (AC_DEBUG): add test
* acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG,
or NDEBUG according to its value. or NDEBUG according to its value.
@ -1613,10 +1613,10 @@ Date: Thu Nov 16 12:35:46 2006 +0000
* make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling:
If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise
always use vecSigmaInit with default all values of sigmaInit. always use vecSigmaInit with default all values of sigmaInit.
* eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else
clause around ptParam (found or not). clause around ptParam (found or not).
* eoParam.h (eoValueParam::setValue): Document. * eoParam.h (eoValueParam::setValue): Document.
(eoValueParam<std::vector<double> >::setValue): Allow delimiters ',' and (eoValueParam<std::vector<double> >::setValue): Allow delimiters ',' and
';'. A plain ' ' does not work, as it is not correctly read by ';'. A plain ' ' does not work, as it is not correctly read by
@ -1973,9 +1973,9 @@ Date: Sun Oct 2 21:42:08 2005 +0000
- add a user-option for gnuplot-support - add a user-option for gnuplot-support
- separate gnuplot-code into declaration and implementation, - separate gnuplot-code into declaration and implementation,
so we can define at EO-build-time whether to use it or not. so we can define at EO-build-time whether to use it or not.
Adopt code and Makefiles to above changes. Adopt code and Makefiles to above changes.
Some minor fixes. Some minor fixes.
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -2311,7 +2311,7 @@ Date: Thu Dec 23 15:29:07 2004 +0000
Adjust code to perform to C++ standard according to gcc-3.4 Adjust code to perform to C++ standard according to gcc-3.4
interpretation... (Have not compiled/checked/changed paradisEO.) interpretation... (Have not compiled/checked/changed paradisEO.)
That is, the current code compiles with gcc-3.4 and the checks That is, the current code compiles with gcc-3.4 and the checks
(besides t-MGE1bit) all pass. (besides t-MGE1bit) all pass.
@ -2362,7 +2362,7 @@ Date: Fri Nov 5 08:57:34 2004 +0000
easily read as a parameter) easily read as a parameter)
- eoIntBound and all other integer-equivalent of the classes in eoRealBound.h - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h
Note that there is no equivalent to eoRealVectorBounds for vector of integers Note that there is no equivalent to eoRealVectorBounds for vector of integers
In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h
The first one was already there by chance, through eoUniformInit.h The first one was already there by chance, through eoUniformInit.h
@ -2569,13 +2569,13 @@ Author: kuepper <kuepper>
Date: Fri Sep 17 16:53:31 2004 +0000 Date: Fri Sep 17 16:53:31 2004 +0000
Updated build-prcess to be completely under automake control. Updated build-prcess to be completely under automake control.
For the tutorial the old Makefiles are saved as Makefile.simple in all For the tutorial the old Makefiles are saved as Makefile.simple in all
the respective directories. the respective directories.
Use generated config.h instead of command-line passing of preprocessor Use generated config.h instead of command-line passing of preprocessor
flags. flags.
Updated support files from current automake. Updated support files from current automake.
Author: kuepper <kuepper> Author: kuepper <kuepper>
@ -3300,7 +3300,7 @@ Date: Sun Jan 5 16:31:50 2003 +0000
Added pyeo. Some changes needed to be made for include files and the like Added pyeo. Some changes needed to be made for include files and the like
in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess])
eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone.
Author: maartenkeijzer <maartenkeijzer> Author: maartenkeijzer <maartenkeijzer>
@ -3398,7 +3398,7 @@ Date: Wed Sep 18 12:40:46 2002 +0000
A new readFrom & printOn function for EO.h A new readFrom & printOn function for EO.h
Now it CAN handle VALID/INVALID fitnesses. Now it CAN handle VALID/INVALID fitnesses.
The problems are over at last The problems are over at last
Author: cahon <cahon> Author: cahon <cahon>
@ -3592,7 +3592,7 @@ Date: Mon Jun 17 04:13:45 2002 +0000
Adding the truncation selectors. Adding the truncation selectors.
2 versions: eoTruncatedSelectOne is an eoSelectOne, and 2 versions: eoTruncatedSelectOne is an eoSelectOne, and
eoTruncatedSelectMany works like an eoSelectMany (but is NOT) eoTruncatedSelectMany works like an eoSelectMany (but is NOT)
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
Date: Mon Jun 10 14:10:35 2002 +0000 Date: Mon Jun 10 14:10:35 2002 +0000
@ -3609,7 +3609,7 @@ Date: Mon May 13 11:31:32 2002 +0000
EO::printOn has been changed so that the printOn function will EO::printOn has been changed so that the printOn function will
always print a valid fitness value even if the fitness is invalid always print a valid fitness value even if the fitness is invalid
Jeroen Jeroen
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
@ -3827,7 +3827,7 @@ Date: Mon Apr 15 12:56:35 2002 +0000
eoParseTree printOn and readFrom functions changed for eoParseTree printOn and readFrom functions changed for
compatibility with paradisEO compatibility with paradisEO
The fitness is now printed in the same way as in eoBit The fitness is now printed in the same way as in eoBit
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -4138,9 +4138,9 @@ Date: Mon Feb 4 14:28:00 2002 +0000
the gpsymreg code has been slightly altered to allow compilation using the the gpsymreg code has been slightly altered to allow compilation using the
Intel C++ Compiler for Linux. Intel C++ Compiler for Linux.
Other compilers should not be affected. Other compilers should not be affected.
A slightly different makefile is needed A slightly different makefile is needed
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
@ -4317,7 +4317,7 @@ Date: Tue Dec 4 21:15:16 2001 +0000
some template classes and functions which did not need some template classes and functions which did not need
to be templates have been changed to normal classes and functions to be templates have been changed to normal classes and functions
with hard coded typed with hard coded typed
This might help with M$VC++ 6.0 compatibility This might help with M$VC++ 6.0 compatibility
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
@ -4537,8 +4537,8 @@ Date: Sat Nov 10 09:02:17 2001 +0000
Small modifications here and there to be MSVC++ compatible Small modifications here and there to be MSVC++ compatible
Mainly, time.h -> ctime Mainly, time.h -> ctime
definition of loop index out of loops when multiply used definition of loop index out of loops when multiply used
no typename in declaration using template typename no typename in declaration using template typename
Author: evomarc <evomarc> Author: evomarc <evomarc>
Date: Sat Nov 10 06:59:02 2001 +0000 Date: Sat Nov 10 06:59:02 2001 +0000
@ -4628,15 +4628,15 @@ Date: Sat Nov 3 22:10:11 2001 +0000
the name of the eoGpDepthInitializer class (initializer for the name of the eoGpDepthInitializer class (initializer for
parse_tree's has been changed to parse_tree's has been changed to
eoParseTreeDepthInit but backward compatibility is maintained by eoParseTreeDepthInit but backward compatibility is maintained by
using a #define statement: using a #define statement:
#define eoGpDepthInitializer eoParseTreeDepthInit #define eoGpDepthInitializer eoParseTreeDepthInit
The initializer for strongly typed GP has been changed to The initializer for strongly typed GP has been changed to
eoStParseTreeDepthInit eoStParseTreeDepthInit
the gpsymreg application has been changed to use the new name the gpsymreg application has been changed to use the new name
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
@ -4839,7 +4839,7 @@ Author: jeggermo <jeggermo>
Date: Tue Jul 17 08:58:52 2001 +0000 Date: Tue Jul 17 08:58:52 2001 +0000
small documentation change for eoParseTree.h. small documentation change for eoParseTree.h.
added a depth initializer for strongly typed genetic programming added a depth initializer for strongly typed genetic programming
added subtree xover for strongly typed genetic programming added subtree xover for strongly typed genetic programming
added branch mutation for strongly typed genetic programming added branch mutation for strongly typed genetic programming
@ -4862,7 +4862,7 @@ Date: Wed Jul 4 04:44:30 2001 +0000
Adding eoPopEvalFunc, that handles evaluation globally: it receives Adding eoPopEvalFunc, that handles evaluation globally: it receives
two populations, parents and offspring, and does whatever necessary. two populations, parents and offspring, and does whatever necessary.
The subclass eoPopLoopEval does the simple loop on the offspring. The subclass eoPopLoopEval does the simple loop on the offspring.
eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor,
but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently.
@ -4874,7 +4874,7 @@ Date: Tue Jul 3 12:56:44 2001 +0000
Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as
before (it is then encapsulated into an eoPopLoopEval that does the good before (it is then encapsulated into an eoPopLoopEval that does the good
old loop on the offspring - or directly pass a full eoPopEvalFunc old loop on the offspring - or directly pass a full eoPopEvalFunc
Small modification also in make_op_es -> keyword "none" is now recognized Small modification also in make_op_es -> keyword "none" is now recognized
for one of the crossover of either object variables or stdev's for one of the crossover of either object variables or stdev's
@ -4883,9 +4883,9 @@ Date: Mon Jul 2 13:31:04 2001 +0000
Changed the directory structure for gp Changed the directory structure for gp
now: eoParseTree <-- the eoParseTree class now: eoParseTree <-- the eoParseTree class
eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer)
eoParseTreeOp <-- the operators (xover and mutation) eoParseTreeOp <-- the operators (xover and mutation)
base documentation written for: base documentation written for:
* eoParseTree * eoParseTree
* eoGpDepthInitializer * eoGpDepthInitializer
@ -4895,9 +4895,9 @@ Date: Mon Jul 2 13:31:04 2001 +0000
* eoExpansionMutation * eoExpansionMutation
* eoCollapseSubtreeMutation * eoCollapseSubtreeMutation
* eoHoistMutation * eoHoistMutation
I also created a group ParseTree which contains all classes related to eoParseTree I also created a group ParseTree which contains all classes related to eoParseTree
eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
@ -4978,16 +4978,16 @@ Author: jeggermo <jeggermo>
Date: Thu Jun 28 14:03:59 2001 +0000 Date: Thu Jun 28 14:03:59 2001 +0000
new Mutation operators for eoParseTree in src/gp/eoGpMutate.h new Mutation operators for eoParseTree in src/gp/eoGpMutate.h
a symbolic regression example program added to the app-dir a symbolic regression example program added to the app-dir
configure.in and Makefile(s).am changed configure.in and Makefile(s).am changed
Author: jeggermo <jeggermo> Author: jeggermo <jeggermo>
Date: Thu Jun 28 13:55:14 2001 +0000 Date: Thu Jun 28 13:55:14 2001 +0000
Additional mutation operators for eoParseTree Additional mutation operators for eoParseTree
* Point Mutation * Point Mutation
* Expansion Mutation * Expansion Mutation
* Collapse Subtree Mutation * Collapse Subtree Mutation
@ -5195,7 +5195,7 @@ Date: Wed May 2 10:42:32 2001 +0000
src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover
src/es/make_XXX_es.h for user-input src/es/make_XXX_es.h for user-input
test/t-eoEsAll.cpp to test test/t-eoEsAll.cpp to test
However, an old bug appeared: className was not const in eoGenOp (and derived classes) However, an old bug appeared: className was not const in eoGenOp (and derived classes)
so I had to change that throughtout the hierarchy so I had to change that throughtout the hierarchy
@ -5212,7 +5212,7 @@ Date: Mon Apr 30 13:24:42 2001 +0000
Changed the interface of make_genotype - now templatized by the EOT Changed the interface of make_genotype - now templatized by the EOT
and not the fitness - this is mandatory for ES genoptypes as it allows to and not the fitness - this is mandatory for ES genoptypes as it allows to
choose the type of gentype at run-time (from existing types, of course!) choose the type of gentype at run-time (from existing types, of course!)
Also moved make_help.cpp into utils dir (otherwise you'd had to maintain Also moved make_help.cpp into utils dir (otherwise you'd had to maintain
a copy into each representation dir!). a copy into each representation dir!).
@ -5224,7 +5224,7 @@ Date: Mon Apr 30 13:01:07 2001 +0000
Changed the interface of make_genotype - now templatized by the EOT Changed the interface of make_genotype - now templatized by the EOT
and not the fitness - this is mandatory for ES genoptypes as it allows to and not the fitness - this is mandatory for ES genoptypes as it allows to
choose the type of gentype at run-time (from existing types, of course!) choose the type of gentype at run-time (from existing types, of course!)
Also moved make_help.cpp into utils dir (otherwise you'd had to maintain Also moved make_help.cpp into utils dir (otherwise you'd had to maintain
a copy into each representation dir!). a copy into each representation dir!).
@ -5427,7 +5427,7 @@ Date: Wed Apr 4 03:47:33 2001 +0000
Added the signal handling - see eoCtrlCContinue.h Added the signal handling - see eoCtrlCContinue.h
I've disabled it in case of MSC as I don't know if this works there ... I've disabled it in case of MSC as I don't know if this works there ...
Also added a couple of "virtual" in the ga dir Also added a couple of "virtual" in the ga dir
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -5455,7 +5455,7 @@ Date: Wed Mar 28 09:00:54 2001 +0000
FDCStat and FileSnapshot: better error messageing FDCStat and FileSnapshot: better error messageing
Scalar fitness: is now a vector of doubles Scalar fitness: is now a vector of doubles
exercise3.1 added gnuplot again exercise3.1 added gnuplot again
Don't know about eoCombinedContinue Don't know about eoCombinedContinue
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -5646,7 +5646,7 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Mon Mar 12 16:00:58 2001 +0000 Date: Mon Mar 12 16:00:58 2001 +0000
EO: added overloaded printing of fitness (for vectors and pairs) EO: added overloaded printing of fitness (for vectors and pairs)
Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth
Author: maartenkeijzer <maartenkeijzer> Author: maartenkeijzer <maartenkeijzer>
@ -5658,12 +5658,12 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Sat Mar 10 14:02:23 2001 +0000 Date: Sat Mar 10 14:02:23 2001 +0000
Changed the populator to be a) more efficient and b) more useable Changed the populator to be a) more efficient and b) more useable
It is no longer derived from eoPop, it now gets a destination population. It is no longer derived from eoPop, it now gets a destination population.
This saves a lot of copying. The semantics has changed a little as well. It is This saves a lot of copying. The semantics has changed a little as well. It is
now an _infinite_ iterator. operator++ will *not* dispense new individuals, but now an _infinite_ iterator. operator++ will *not* dispense new individuals, but
will merely stay at the end. To get a new indy, use operator*() as before. will merely stay at the end. To get a new indy, use operator*() as before.
eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring
eoGeneralBreeder is changed to reflect the changes in eoPopulator eoGeneralBreeder is changed to reflect the changes in eoPopulator
eoSequentialSelect now uses setup() rather than init() eoSequentialSelect now uses setup() rather than init()
@ -5717,7 +5717,7 @@ Date: Mon Feb 19 12:23:13 2001 +0000
To be able to use the primitive std::generate function, added a To be able to use the primitive std::generate function, added a
set of wrappers in eoSTLFunctor.h that have the copy semantics most set of wrappers in eoSTLFunctor.h that have the copy semantics most
STL functions expect (namely pass-by-value rather then pass-by-reference). STL functions expect (namely pass-by-value rather then pass-by-reference).
Updated test/Makefile.am to also test t-eoRandom Updated test/Makefile.am to also test t-eoRandom
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -5736,14 +5736,14 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Sat Feb 17 10:51:31 2001 +0000 Date: Sat Feb 17 10:51:31 2001 +0000
eoVector is back (eoFixedLength and eoVariableLength are gone) eoVector is back (eoFixedLength and eoVariableLength are gone)
Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: Also: introducing eoRndGenerators.h for eoRndGenerator derived classes:
eoNormalGenerator eoNormalGenerator
eoUniformGenerator eoUniformGenerator
eoBooleanGenerator eoBooleanGenerator
eoNegExpGenerator eoNegExpGenerator
Note the suffix that are added to aid in determining what these classes do Note the suffix that are added to aid in determining what these classes do
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -5829,13 +5829,13 @@ Date: Wed Feb 14 14:09:16 2001 +0000
Author: maartenkeijzer <maartenkeijzer> Author: maartenkeijzer <maartenkeijzer>
Date: Wed Feb 14 10:35:26 2001 +0000 Date: Wed Feb 14 10:35:26 2001 +0000
Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, Changed the signature of eoMon, eoBin and eoQuadOp to return a bool,
without invalidating fitness. Added a set of invalidators to take over without invalidating fitness. Added a set of invalidators to take over
that job (see for instance eoSGA and eoSGATransform how this can transparantly used) that job (see for instance eoSGA and eoSGATransform how this can transparantly used)
Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong)
Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor
exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore)
and of course changed all the operators to reflect the change (and found a few that didn't and of course changed all the operators to reflect the change (and found a few that didn't
@ -5865,24 +5865,24 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Tue Feb 13 12:38:19 2001 +0000 Date: Tue Feb 13 12:38:19 2001 +0000
fixed a bug: the parser now correctly parses parameters of the form fixed a bug: the parser now correctly parses parameters of the form
-Pvalue -Pvalue
This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply
ashamed to have created such an off-by-one error. ashamed to have created such an off-by-one error.
Marc assumed this was wanted behaviour (so that it should read: -P=value) Marc assumed this was wanted behaviour (so that it should read: -P=value)
I must admit that this is a logical conclusion, though it was merely a side-effect I must admit that this is a logical conclusion, though it was merely a side-effect
of the error. To not force Marc to rewrite the tutorial and his way of working with of the error. To not force Marc to rewrite the tutorial and his way of working with
EO, I decided to make a feature out of the bug, so that now the parser will parse: EO, I decided to make a feature out of the bug, so that now the parser will parse:
-Pvalue -Pvalue
-P=value -P=value
and of course the true and blue: and of course the true and blue:
-Parameter=value -Parameter=value
I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!)
Author: maartenkeijzer <maartenkeijzer> Author: maartenkeijzer <maartenkeijzer>
@ -5894,14 +5894,14 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Mon Feb 12 13:58:51 2001 +0000 Date: Mon Feb 12 13:58:51 2001 +0000
Ok, updated the Makefile.am again to use the Ok, updated the Makefile.am again to use the
make check make check
Command I picked up in the automake documentation (RTFM, you know) Command I picked up in the automake documentation (RTFM, you know)
Tagged a lot of header functions in the GnuPlot files with 'inline', Tagged a lot of header functions in the GnuPlot files with 'inline',
so they can be used from more than one sourcefile. so they can be used from more than one sourcefile.
Ok, now the interesting news. Started a new library libga (not to be confused Ok, now the interesting news. Started a new library libga (not to be confused
with Matthew's GaLib). Here I suggest we put a fairly complete and configurable with Matthew's GaLib). Here I suggest we put a fairly complete and configurable
genetic algorithm. Just to see how far we can stretch ourselves and also to have genetic algorithm. Just to see how far we can stretch ourselves and also to have
@ -5920,7 +5920,7 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Sun Feb 11 16:25:03 2001 +0000 Date: Sun Feb 11 16:25:03 2001 +0000
Removed small bug in reading outside a buffer in eoParser::readFrom Removed small bug in reading outside a buffer in eoParser::readFrom
This caused the parser to crash when a simple flag of the form program -f This caused the parser to crash when a simple flag of the form program -f
was given. was given.
@ -6014,8 +6014,8 @@ Date: Fri Feb 9 05:09:26 2001 +0000
I also changed I also changed
- the eoQuadratic into eoQuad (as dicussed with Maarten) - the eoQuadratic into eoQuad (as dicussed with Maarten)
- the eoBin into eoBit, with more appropriate names for the "binary" - the eoBin into eoBit, with more appropriate names for the "binary"
operators (that can be unary!) as no one protested when I posted on operators (that can be unary!) as no one protested when I posted on
eodev list eodev list
Author: evomarc <evomarc> Author: evomarc <evomarc>
Date: Wed Feb 7 05:15:18 2001 +0000 Date: Wed Feb 7 05:15:18 2001 +0000
@ -6039,7 +6039,7 @@ Date: Wed Feb 7 05:04:24 2001 +0000
Added selection methods Added selection methods
eoBestSelect always return the best individual eoBestSelect always return the best individual
eoSequentialSelect a selectOne version of eoDetSelect (uses an index to eoSequentialSelect a selectOne version of eoDetSelect (uses an index to
return next offspring from sorted pop) return next offspring from sorted pop)
Author: evomarc <evomarc> Author: evomarc <evomarc>
Date: Thu Feb 1 05:27:36 2001 +0000 Date: Thu Feb 1 05:27:36 2001 +0000
@ -6061,7 +6061,7 @@ Date: Wed Jan 31 18:38:39 2001 +0000
every generation) which is different from the continuous monitoring (same file/plot is every generation) which is different from the continuous monitoring (same file/plot is
angemented every generation). angemented every generation).
This lead to a number of modifications in many files in utils dir This lead to a number of modifications in many files in utils dir
But now we can watch on-line But now we can watch on-line
- fitness spreadout - fitness spreadout
- FDC plots - FDC plots
@ -6078,7 +6078,7 @@ Date: Mon Jan 29 10:25:44 2001 +0000
Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. Added the truncate and the hasNoBoundAtAll methods in eoRealBounds.
The former simply set values to the boundary values in case they are out The former simply set values to the boundary values in case they are out
The latter allows to short-cut all bound-checks when no need The latter allows to short-cut all bound-checks when no need
SOme day I will put this in utils, and have a eoRealBounds.cpp in the SOme day I will put this in utils, and have a eoRealBounds.cpp in the
pre-compiled library pre-compiled library
@ -6129,12 +6129,12 @@ Date: Sat Jan 27 07:43:58 2001 +0000
eo everything that is general to any representation eo everything that is general to any representation
es.h everything about real representation (in es dir) es.h everything about real representation (in es dir)
ga.h everything related to bitstring representation (in ga dir) ga.h everything related to bitstring representation (in ga dir)
To be continued by gp.h, and ... To be continued by gp.h, and ...
This has lead to some slight modifications in test file eobin and all tutorial This has lead to some slight modifications in test file eobin and all tutorial
examples files... examples files...
I've also added in utils eoDistance, generic functor to compute distances, I've also added in utils eoDistance, generic functor to compute distances,
including also the generic Euclidian distance including also the generic Euclidian distance
@ -6145,9 +6145,9 @@ Date: Sat Jan 27 07:41:46 2001 +0000
eo everything that is general to any representation eo everything that is general to any representation
es.h everything about real representation (in es dir) es.h everything about real representation (in es dir)
ga.h everything related to bitstring representation (in ga dir) ga.h everything related to bitstring representation (in ga dir)
To be continued by gp.h, and ... To be continued by gp.h, and ...
This has lead to some slight modifications in test file eobin and all tutorial This has lead to some slight modifications in test file eobin and all tutorial
examples files... examples files...
@ -6405,7 +6405,7 @@ Date: Tue Jan 2 07:03:57 2001 +0000
permanent parameters (eoParser only holds references), and egcs did not allow permanent parameters (eoParser only holds references), and egcs did not allow
to create them by reference, i.e. in the line to create them by reference, i.e. in the line
eoValueParam<xxx> & blablaParam(...); eoValueParam<xxx> & blablaParam(...);
So now everything is done in the main_function, and 3 lines are needed to create So now everything is done in the main_function, and 3 lines are needed to create
and read every paramter (sigh ...) and read every paramter (sigh ...)
@ -6483,16 +6483,16 @@ Date: Tue Dec 19 18:41:19 2000 +0000
THe big eoReplacement update: THe big eoReplacement update:
The interface for eoReplacement is now eoPop<EOT>&, eoPop<EOT>& The interface for eoReplacement is now eoPop<EOT>&, eoPop<EOT>&
(i.e. no const) and the result must be in the first argument in the end. (i.e. no const) and the result must be in the first argument in the end.
Hence it is possible to do SSGA and all intermediate replacmeent procedures Hence it is possible to do SSGA and all intermediate replacmeent procedures
The classes derived from eoMergeReduce.h are now in a separate file The classes derived from eoMergeReduce.h are now in a separate file
The SSGA-like replcaement procedures are in eoReduceMerge.h The SSGA-like replcaement procedures are in eoReduceMerge.h
A more general replacement can be found in eoSurviveAndDie.h A more general replacement can be found in eoSurviveAndDie.h
(it could be made a littel more general - still open for upgrades). (it could be made a littel more general - still open for upgrades).
Also some accessors have been added to the eoPop (best and worse individuals) Also some accessors have been added to the eoPop (best and worse individuals)
And include file eo has been updated And include file eo has been updated
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -6630,16 +6630,16 @@ Author: evomarc <evomarc>
Date: Mon Dec 4 06:58:43 2000 +0000 Date: Mon Dec 4 06:58:43 2000 +0000
Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint,
a method called lastCall is called for everything contained in that checkpoint a method called lastCall is called for everything contained in that checkpoint
(stats, updaters and monitors). This can be extremely useful (stats, updaters and monitors). This can be extremely useful
- for stateSavers (see below) - for stateSavers (see below)
- for monitoring things like rates of success of operators, where what you - for monitoring things like rates of success of operators, where what you
are interested in is the final result only. are interested in is the final result only.
Added of course a virtual method lastCall that does nothing by default in classes Added of course a virtual method lastCall that does nothing by default in classes
eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor
Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall
so you can ask that the state is saved at final population, whatever happens. so you can ask that the state is saved at final population, whatever happens.
I also added the corresponding constructor to take this into account. I also added the corresponding constructor to take this into account.
Author: evomarc <evomarc> Author: evomarc <evomarc>
Date: Mon Dec 4 05:55:59 2000 +0000 Date: Mon Dec 4 05:55:59 2000 +0000
@ -6822,8 +6822,8 @@ Author: evomarc <evomarc>
Date: Tue Nov 28 06:46:37 2000 +0000 Date: Tue Nov 28 06:46:37 2000 +0000
Modified the contructor: the default value for the delimiter is now " " Modified the contructor: the default value for the delimiter is now " "
and I added a boolean argument to indicate whether or not we want to and I added a boolean argument to indicate whether or not we want to
overwrite an existing file with same name (default is overwrite). overwrite an existing file with same name (default is overwrite).
Added the getFileName accessor. Added the getFileName accessor.
Author: evomarc <evomarc> Author: evomarc <evomarc>
@ -7085,7 +7085,7 @@ Author: maartenkeijzer <maartenkeijzer>
Date: Fri Oct 6 10:41:38 2000 +0000 Date: Fri Oct 6 10:41:38 2000 +0000
Added an eoSortedStatBase for more efficient statistic calculations Added an eoSortedStatBase for more efficient statistic calculations
updated a few makefiles to include the html and latex docs with the updated a few makefiles to include the html and latex docs with the
distribution. distribution.
@ -7844,12 +7844,12 @@ Author: mac <mac>
Date: Mon Mar 6 16:05:47 2000 +0000 Date: Mon Mar 6 16:05:47 2000 +0000
Fixed bug in eoGOpSelector (missing break!) Fixed bug in eoGOpSelector (missing break!)
eoOp.h: binOp's second arg is const once more eoOp.h: binOp's second arg is const once more
all dsp and dsw files were touched by msvc, but did add some stuff (which all dsp and dsw files were touched by msvc, but did add some stuff (which
will be added to eo later) will be added to eo later)
Hope this all works Hope this all works
Author: mac <mac> Author: mac <mac>
@ -7879,7 +7879,7 @@ Author: marc <marc>
Date: Tue Feb 29 05:14:40 2000 +0000 Date: Tue Feb 29 05:14:40 2000 +0000
wherease the command "cvs ci" is OK. wherease the command "cvs ci" is OK.
Here we go: Here we go:
- added the virtual destructors of all classes, - added the virtual destructors of all classes,
to suppress g++ annoying warnings when using -Wall option to suppress g++ annoying warnings when using -Wall option
@ -7930,7 +7930,7 @@ Date: Sat Feb 19 16:30:42 2000 +0000
Moved the static eoRNG rng to an extern eoRNG Moved the static eoRNG rng to an extern eoRNG
This external object is now defined in eoPersistent.cpp This external object is now defined in eoPersistent.cpp
This should change... This should change...
Author: mac <mac> Author: mac <mac>

View file

@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does. and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's 1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an you conspicuously and appropriately publish on each copy an
@ -457,7 +457,7 @@ DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that possible use to the public, we recommend making it free software that

View file

@ -1,4 +1,3 @@
# NOTE: only add something here if it is really needed by EO # NOTE: only add something here if it is really needed by EO
include(CheckIncludeFile) include(CheckIncludeFile)
@ -7,17 +6,17 @@ include(CheckSymbolExists)
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckLibraryExists) include(CheckLibraryExists)
check_library_exists(m cos "cos in libm" HAVE_LIBM) check_library_exists(m cos "cos in libm" HAVE_LIBM)
check_include_files(cmath.h "cmath.h" HAVE_CMATH_H) check_include_files(cmath.h "cmath.h" HAVE_CMATH_H)
check_include_files(stdio.h "stdio.h" HAVE_STDIO_H) check_include_files(stdio.h "stdio.h" HAVE_STDIO_H)
check_include_files(stdlib.h "stdlib.h" HAVE_STDLIB_H) check_include_files(stdlib.h "stdlib.h" HAVE_STDLIB_H)
check_include_files(string.h "string.h" HAVE_STRING_H) check_include_files(string.h "string.h" HAVE_STRING_H)
check_include_files(strings.h "strings.h" HAVE_STRINGS_H) check_include_files(strings.h "strings.h" HAVE_STRINGS_H)
check_include_files(malloc.h "malloc.h" HAVE_MALLOC_H) check_include_files(malloc.h "malloc.h" HAVE_MALLOC_H)
check_include_files(limits.h "limits.h" HAVE_LIMITS_H) check_include_files(limits.h "limits.h" HAVE_LIMITS_H)
check_include_files(unistd.h "unistd.h" HAVE_UNISTD_H) check_include_files(unistd.h "unistd.h" HAVE_UNISTD_H)
check_include_files(stdint.h "stdint.h" HAVE_STDINT_H) check_include_files(stdint.h "stdint.h" HAVE_STDINT_H)
# Use check_symbol_exists to check for symbols in a reliable # Use check_symbol_exists to check for symbols in a reliable
@ -27,7 +26,4 @@ check_include_files(stdint.h "stdint.h" HAVE_STDINT_H)
# specific order. Refer to the man page for each symbol for which a # specific order. Refer to the man page for each symbol for which a
# check is to be added to get the proper set of headers. Example : # check is to be added to get the proper set of headers. Example :
#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE) #check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE)

View file

@ -233,4 +233,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run `configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. `configure --help' for more details.

View file

@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does. and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's 1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an you conspicuously and appropriately publish on each copy an
@ -457,7 +457,7 @@ DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that possible use to the public, we recommend making it free software that
@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
Ty Coon, President of Vice Ty Coon, President of Vice
That's all there is to it! That's all there is to it!

13
eo/NEWS
View file

@ -7,11 +7,11 @@
- GCC 4.3 compatibility - GCC 4.3 compatibility
- new versatile log system with several nested verbose levels - new versatile log system with several nested verbose levels
- classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files: - classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files:
eo/src/eoCombinedInit.h eo/src/eoCombinedInit.h
eo/src/eoGenContinue.h eo/src/eoGenContinue.h
eo/src/eoProportionalCombinedOp.h eo/src/eoProportionalCombinedOp.h
eo/src/utils/eoData.h eo/src/utils/eoData.h
eo/src/utils/eoStdoutMonitor.h eo/src/utils/eoStdoutMonitor.h
- an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations - an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations
- new monitor that can write on any ostream - new monitor that can write on any ostream
- new continuator that can catch POSIX system user signals - new continuator that can catch POSIX system user signals
@ -33,10 +33,9 @@
- Add Microsoft Visual C++ project support files (for Visual Studio 2003 and 2005) - Add Microsoft Visual C++ project support files (for Visual Studio 2003 and 2005)
- Upgrade Teamplates/ script to create a complete standalone EO project (using autotools) - Upgrade Teamplates/ script to create a complete standalone EO project (using autotools)
- Remove support for pre-standard C++ compiler (i.e. gcc-2.x), which allows to - Remove support for pre-standard C++ compiler (i.e. gcc-2.x), which allows to
clean up the code considerably. clean up the code considerably.
Assume availability of sstream and limits. Assume availability of sstream and limits.
* release 0.9.3z.1 (1. Oct. 2005) * release 0.9.3z.1 (1. Oct. 2005)
- Support gcc-3.4 and gcc.4.x. - Support gcc-3.4 and gcc.4.x.
- Provide full automake/autoconf/configure support. - Provide full automake/autoconf/configure support.

View file

@ -1,8 +1,7 @@
EO README FILE
EO README FILE
======================================================================= =======================================================================
check latest news at http://eodev.sourceforge.net/ check latest news at http://eodev.sourceforge.net/
======================================================================= =======================================================================
Welcome to EO, the Evolving Objects library. Welcome to EO, the Evolving Objects library.
@ -14,7 +13,7 @@ In case of any problem, please e-mail us at
eodev-help@lists.sourceforge.net, eodev@egroups.com eodev-help@lists.sourceforge.net, eodev@egroups.com
To get started, take a look at the tutorial, starting with To get started, take a look at the tutorial, starting with
./tutorial/html/eoTutorial.html ./tutorial/html/eoTutorial.html
The easiest way to start programming a new genome with all EO The easiest way to start programming a new genome with all EO
evolution engines handy is to create a new standalone EO project from evolution engines handy is to create a new standalone EO project from
@ -23,11 +22,11 @@ an introduction;)
================================================================== ==================================================================
BUILDING EO BUILDING EO
================================================================== ==================================================================
The basic installation procedure goes the following: The basic installation procedure goes the following:
Go to your build-directory and run Go to your build-directory and run
$(SRCDIR)/configure $(SRCDIR)/configure
make make
make check make check
@ -50,7 +49,7 @@ specific about EO.
=================================================================== ===================================================================
DIRECTORY STRUCTURE DIRECTORY STRUCTURE
=================================================================== ===================================================================
After unpacking the archive file, you should end up with the following After unpacking the archive file, you should end up with the following
structure: structure:
@ -63,7 +62,7 @@ structure:
| | | |
| +- ga bistring-genotypes source files | +- ga bistring-genotypes source files
| | | |
| +- es real-valued-genotypes source files | +- es real-valued-genotypes source files
| | | |
| +- gp Genetic Programming source files | +- gp Genetic Programming source files
| | | |
@ -74,9 +73,9 @@ structure:
+-- tutorial TUTORIAL dir (indeed :-) +-- tutorial TUTORIAL dir (indeed :-)
| | | |
| +- html all html files - start by browsing index.html | +- html all html files - start by browsing index.html
| | | |
| +- LessonX for X=1, 2, 3, ... : example of increasing complexity | +- LessonX for X=1, 2, 3, ... : example of increasing complexity
| |
| |
| |
+-- doc DOCUMENTATION dir (generated by Doxygen) +-- doc DOCUMENTATION dir (generated by Doxygen)
@ -93,7 +92,7 @@ structure:
| |
+-- app APPLICATIONS - one dir per separate application +-- app APPLICATIONS - one dir per separate application
| | | |
| +- gprop GA/backpropagation for neural nets | +- gprop GA/backpropagation for neural nets
| | | |
| +- mastermind the wellknown MasterMind game | +- mastermind the wellknown MasterMind game
| |
@ -103,7 +102,7 @@ structure:
=================================================================== ===================================================================
NOTES NOTES
=================================================================== ===================================================================
If you extracted a fresh snapshot from the cvs-repository, remember If you extracted a fresh snapshot from the cvs-repository, remember
to run to run

View file

@ -18,15 +18,14 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
SET (GPROP_SOURCES gprop.cpp) SET (GPROP_SOURCES gprop.cpp)
# especially for Visual Studio # especially for Visual Studio
IF(NOT WIN32 OR CYGWIN) IF(NOT WIN32 OR CYGWIN)
ADD_EXECUTABLE(gprop ${GPROP_SOURCES}) ADD_EXECUTABLE(gprop ${GPROP_SOURCES})
ADD_DEPENDENCIES(gprop eo eoutils) ADD_DEPENDENCIES(gprop eo eoutils)
TARGET_LINK_LIBRARIES(gprop eo eoutils) TARGET_LINK_LIBRARIES(gprop eo eoutils)
SET(GPROP_VERSION ${GLOBAL_VERSION}) SET(GPROP_VERSION ${GLOBAL_VERSION})
SET_TARGET_PROPERTIES(gprop PROPERTIES VERSION "${GPROP_VERSION}") SET_TARGET_PROPERTIES(gprop PROPERTIES VERSION "${GPROP_VERSION}")
ENDIF(NOT WIN32 OR CYGWIN) ENDIF(NOT WIN32 OR CYGWIN)
###################################################################################### ######################################################################################

View file

@ -207,12 +207,12 @@ int correct(const mlp::net& net, const mlp::set& set)
unsigned partial = 0; unsigned partial = 0;
for (unsigned i = 0; i < s->output.size(); ++i) for (unsigned i = 0; i < s->output.size(); ++i)
if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) || if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) ||
(s->output[i] > 0.5 && net(s->input)[i] > 0.5)) (s->output[i] > 0.5 && net(s->input)[i] > 0.5))
++partial; ++partial;
if (partial == s->output.size()) if (partial == s->output.size())
++sum; ++sum;
} }
return sum; return sum;

View file

@ -29,7 +29,7 @@ namespace l2
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// error // error
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
real error(const mlp::net& net, const set& ts) real error(const mlp::net& net, const set& ts)
{ {
real error_ = 0.0; real error_ = 0.0;
@ -37,12 +37,12 @@ namespace l2
for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) for (set::const_iterator s = ts.begin(); s != ts.end(); ++s)
{ {
vector out = net(s->input); vector out = net(s->input);
for (unsigned i = 0; i < out.size(); ++i) for (unsigned i = 0; i < out.size(); ++i)
{ {
real target = s->output[i]; real target = s->output[i];
real value = out[i]; real value = out[i];
error_ -= target * log(value + min_real) + error_ -= target * log(value + min_real) +
(1.0 - target) * log(1.0 - value + min_real); (1.0 - target) * log(1.0 - value + min_real);
} }
} }
@ -53,25 +53,25 @@ namespace l2
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// l2 // l2
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
class net: public qp::net class net: public qp::net
{ {
public: public:
net(mlp::net& n): qp::net(n) {} net(mlp::net& n): qp::net(n) {}
real error(const set& ts) real error(const set& ts)
{ {
real error_ = 0; real error_ = 0;
for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) for (set::const_iterator s = ts.begin(); s != ts.end(); ++s)
{ {
forward(s->input); forward(s->input);
error_ -= backward(s->input, s->output); error_ -= backward(s->input, s->output);
} }
return error_; return error_;
} }
private: private:
real backward(const vector& input, const vector& output) real backward(const vector& input, const vector& output)
{ {
@ -84,7 +84,7 @@ namespace l2
{ {
neuron& n = (*current_layer)[j]; neuron& n = (*current_layer)[j];
real out = output[j]; real out = output[j];
n.ndelta += n.delta = (out - n.out) / n.ndelta += n.delta = (out - n.out) /
(n.out * (1.0 - n.out) + min_real) * n.out * (1.0 - n.out); (n.out * (1.0 - n.out) + min_real) * n.out * (1.0 - n.out);
if (size() == 1) // monolayer if (size() == 1) // monolayer
@ -92,21 +92,21 @@ namespace l2
else // multilayer else // multilayer
for (unsigned k = 0; k < n.dxo.size(); ++k) for (unsigned k = 0; k < n.dxo.size(); ++k)
n.dxo[k] += n.delta * (*backward_layer)[k].out; n.dxo[k] += n.delta * (*backward_layer)[k].out;
error_ += out * log(n.out + min_real) + error_ += out * log(n.out + min_real) +
(1.0 - out) * log(1.0 - n.out + min_real); (1.0 - out) * log(1.0 - n.out + min_real);
} }
// hidden layers // hidden layers
while (++current_layer != rend()) while (++current_layer != rend())
{ {
reverse_iterator forward_layer = current_layer - 1; reverse_iterator forward_layer = current_layer - 1;
reverse_iterator backward_layer = current_layer + 1; reverse_iterator backward_layer = current_layer + 1;
for (unsigned j = 0; j < current_layer->size(); ++j) for (unsigned j = 0; j < current_layer->size(); ++j)
{ {
neuron& n = (*current_layer)[j]; neuron& n = (*current_layer)[j];
real sum = 0; real sum = 0;
for (unsigned k = 0; k < forward_layer->size(); ++k) for (unsigned k = 0; k < forward_layer->size(); ++k)
{ {
neuron& nf = (*forward_layer)[k]; neuron& nf = (*forward_layer)[k];
@ -114,7 +114,7 @@ namespace l2
} }
n.delta = n.out * (1.0 - n.out) * sum; n.delta = n.out * (1.0 - n.out) * sum;
n.ndelta += n.delta; n.ndelta += n.delta;
if (backward_layer == rend()) // first hidden layer if (backward_layer == rend()) // first hidden layer
n.dxo += n.delta * input; n.dxo += n.delta * input;
else // rest of hidden layers else // rest of hidden layers
@ -122,19 +122,19 @@ namespace l2
n.dxo[k] += n.delta * (*backward_layer)[k].out; n.dxo[k] += n.delta * (*backward_layer)[k].out;
} }
} }
return error_; return error_;
} }
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
} // namespace l2 } // namespace l2
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#endif // l2_h #endif // l2_h
// Local Variables: // Local Variables:
// mode:C++ // mode:C++
// End: // End:

View file

@ -45,7 +45,7 @@ namespace std {
istream& operator>>(istream& is, mlp::vector& v) istream& operator>>(istream& is, mlp::vector& v)
{ {
for (mlp::vector::iterator vi = v.begin() ; vi != v.end() ; vi++) { for (mlp::vector::iterator vi = v.begin() ; vi != v.end() ; vi++) {
is >> *vi; is >> *vi;
} }
return is; return is;
} }
@ -133,15 +133,15 @@ namespace mlp
#ifdef HAVE_LIBYAML_CPP #ifdef HAVE_LIBYAML_CPP
YAML_SERIALIZABLE_AUTO(neuron) YAML_SERIALIZABLE_AUTO(neuron)
void emit_yaml(YAML::Emitter&out) const { void emit_yaml(YAML::Emitter&out) const {
out << YAML::BeginMap; out << YAML::BeginMap;
out << YAML::Key << "Class" << YAML::Value << "mlp::neuron"; out << YAML::Key << "Class" << YAML::Value << "mlp::neuron";
YAML_EMIT_MEMBER(out,bias); YAML_EMIT_MEMBER(out,bias);
YAML_EMIT_MEMBER(out,weight); YAML_EMIT_MEMBER(out,weight);
out << YAML::EndMap; out << YAML::EndMap;
} }
void load_yaml(const YAML::Node& node) { void load_yaml(const YAML::Node& node) {
YAML_LOAD_MEMBER(node, bias); YAML_LOAD_MEMBER(node, bias);
YAML_LOAD_MEMBER(node, weight); YAML_LOAD_MEMBER(node, weight);
} }
#endif #endif
}; };
@ -213,17 +213,17 @@ namespace mlp {
} }
#ifdef HAVE_LIBYAML_CPP #ifdef HAVE_LIBYAML_CPP
friend ostream& operator<<(YAML::Emitter& e, const layer &l) { friend ostream& operator<<(YAML::Emitter& e, const layer &l) {
e << ((std::vector<neuron>)l); e << ((std::vector<neuron>)l);
} }
friend void operator>>(const YAML::Node& n, layer &l) { friend void operator>>(const YAML::Node& n, layer &l) {
// These temporary variable shenanegins are necessary because // These temporary variable shenanegins are necessary because
// the compiler gets very confused about which template operator>> // the compiler gets very confused about which template operator>>
// function to use. // function to use.
// The following does not work: n >> l; // The following does not work: n >> l;
// So we use a temporary variable thusly: // So we use a temporary variable thusly:
std::vector<mlp::neuron> *obviously_a_vector = &l; std::vector<mlp::neuron> *obviously_a_vector = &l;
n >> *obviously_a_vector; n >> *obviously_a_vector;
} }
#endif #endif
@ -243,7 +243,7 @@ namespace std {
istream& operator>>(istream& is, mlp::layer& l) istream& operator>>(istream& is, mlp::layer& l)
{ {
for (mlp::layer::iterator li = l.begin() ; li != l.end() ; li++) { for (mlp::layer::iterator li = l.begin() ; li != l.end() ; li++) {
is >> *li; is >> *li;
} }
return is; return is;
} }
@ -277,15 +277,15 @@ namespace mlp {
#ifdef HAVE_LIBYAML_CPP #ifdef HAVE_LIBYAML_CPP
YAML_SERIALIZABLE_AUTO(net) YAML_SERIALIZABLE_AUTO(net)
void emit_members(YAML::Emitter&out) const { void emit_members(YAML::Emitter&out) const {
const std::vector<layer>* me_as_layer_vector = this; const std::vector<layer>* me_as_layer_vector = this;
out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector; out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector;
} }
void load_members(const YAML::Node& node) { void load_members(const YAML::Node& node) {
std::vector<layer>* me_as_layer_vector = this; std::vector<layer>* me_as_layer_vector = this;
node["layers"] >> *me_as_layer_vector; node["layers"] >> *me_as_layer_vector;
} }
#endif // HAVE_LIBYAML_CPP #endif // HAVE_LIBYAML_CPP
/** Virtual destructor */ /** Virtual destructor */
virtual ~net() {}; virtual ~net() {};
@ -303,14 +303,14 @@ namespace mlp {
is >> layer_size; is >> layer_size;
layer_sizes.push_back(layer_size); layer_sizes.push_back(layer_size);
} }
unsigned check_outputs; unsigned check_outputs;
is >> check_outputs; is >> check_outputs;
assert (check_outputs == num_outputs); assert (check_outputs == num_outputs);
init (num_inputs,num_outputs,layer_sizes); init (num_inputs,num_outputs,layer_sizes);
// skip forward to pass up opening '<' char // skip forward to pass up opening '<' char
char c=' '; char c=' ';
while (c!='<' && !is.eof()) { is >> c;} while (c!='<' && !is.eof()) { is >> c;}
for (iterator l =begin() ; l != end(); l++) { for (iterator l =begin() ; l != end(); l++) {
is >> *l; is >> *l;
} }
do { is >> c; } while (c == ' ' && !is.eof()); do { is >> c; } while (c == ' ' && !is.eof());
@ -351,15 +351,15 @@ namespace mlp {
} }
void save(ostream &os) const { void save(ostream &os) const {
// Save the number of inputs, number of outputs, and number of hidden layers // Save the number of inputs, number of outputs, and number of hidden layers
os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n"; os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n";
for(const_iterator l = begin(); l != end(); ++l) for(const_iterator l = begin(); l != end(); ++l)
os << l->size() << " "; os << l->size() << " ";
os << "\n"; os << "\n";
os << "< "; os << "< ";
for(const_iterator l = begin(); l != end(); ++l) for(const_iterator l = begin(); l != end(); ++l)
os << *l << " "; os << *l << " ";
os << ">\n"; os << ">\n";
} }
@ -454,7 +454,7 @@ namespace mlp {
void load(istream &is) { void load(istream &is) {
unsigned input_size, output_size; unsigned input_size, output_size;
is >> input_size >> output_size; is >> input_size >> output_size;
sample samp(input_size, output_size);; sample samp(input_size, output_size);;
while (is >> samp) { push_back(samp); } while (is >> samp) { push_back(samp); }
} }

View file

@ -28,7 +28,7 @@ namespace mse
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// error // error
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
real error(const mlp::net& net, const set& ts) real error(const mlp::net& net, const set& ts)
{ {
real error_ = 0.0; real error_ = 0.0;
@ -36,7 +36,7 @@ namespace mse
for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) for (set::const_iterator s = ts.begin(); s != ts.end(); ++s)
{ {
vector out = net(s->input); vector out = net(s->input);
for (unsigned i = 0; i < out.size(); ++i) for (unsigned i = 0; i < out.size(); ++i)
{ {
real diff = s->output[i] - out[i]; real diff = s->output[i] - out[i];
@ -49,26 +49,26 @@ namespace mse
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// mse // mse
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
class net: public qp::net class net: public qp::net
{ {
public: public:
net(mlp::net& n): qp::net(n) {} net(mlp::net& n): qp::net(n) {}
real error(const set& ts) real error(const set& ts)
{ {
real error_ = 0; real error_ = 0;
for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) for (set::const_iterator s = ts.begin(); s != ts.end(); ++s)
{ {
forward(s->input); forward(s->input);
error_ += backward(s->input, s->output); error_ += backward(s->input, s->output);
} }
error_ /= ts.size(); error_ /= ts.size();
return error_; return error_;
} }
private: private:
real backward(const vector& input, const vector& output) real backward(const vector& input, const vector& output)
{ {
@ -89,22 +89,22 @@ namespace mse
else // multilayer else // multilayer
for (unsigned k = 0; k < n.dxo.size(); ++k) for (unsigned k = 0; k < n.dxo.size(); ++k)
n.dxo[k] += n.delta * (*backward_layer)[k].out; n.dxo[k] += n.delta * (*backward_layer)[k].out;
error_ += diff * diff; error_ += diff * diff;
} }
// hidden layers // hidden layers
while (++current_layer != rend()) while (++current_layer != rend())
{ {
reverse_iterator forward_layer = current_layer - 1; reverse_iterator forward_layer = current_layer - 1;
reverse_iterator backward_layer = current_layer + 1; reverse_iterator backward_layer = current_layer + 1;
for (unsigned j = 0; j < current_layer->size(); ++j) for (unsigned j = 0; j < current_layer->size(); ++j)
{ {
neuron& n = (*current_layer)[j]; neuron& n = (*current_layer)[j];
real sum = 0; real sum = 0;
for (unsigned k = 0; k < forward_layer->size(); ++k) for (unsigned k = 0; k < forward_layer->size(); ++k)
{ {
neuron& nf = (*forward_layer)[k]; neuron& nf = (*forward_layer)[k];
@ -113,8 +113,8 @@ namespace mse
n.delta = n.out * (1.0 - n.out) * sum; n.delta = n.out * (1.0 - n.out) * sum;
n.ndelta += n.delta; n.ndelta += n.delta;
if (backward_layer == rend()) // first hidden layer if (backward_layer == rend()) // first hidden layer
n.dxo += n.delta * input; n.dxo += n.delta * input;
else // rest of hidden layers else // rest of hidden layers
@ -122,19 +122,19 @@ namespace mse
n.dxo[k] += n.delta * (*backward_layer)[k].out; n.dxo[k] += n.delta * (*backward_layer)[k].out;
} }
} }
return error_; return error_;
} }
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
} // namespace mse } // namespace mse
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#endif // mse_h #endif // mse_h
// Local Variables: // Local Variables:
// mode:C++ // mode:C++
// End: // End:

View file

@ -41,55 +41,55 @@ namespace qp
const real backtrack_step = 0.5; const real backtrack_step = 0.5;
const real me_floor = 0.0001; const real me_floor = 0.0001;
const real mw_floor = 0.0001; const real mw_floor = 0.0001;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// neuron // neuron
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
struct neuron struct neuron
{ {
mlp::neuron* n; mlp::neuron* n;
real out, delta, ndelta, dbias1, dbias2; real out, delta, ndelta, dbias1, dbias2;
vector dweight1, dweight2, dxo; vector dweight1, dweight2, dxo;
neuron(mlp::neuron& _n): neuron(mlp::neuron& _n):
n(&_n), out(0), delta(0), ndelta(0), dbias1(0), dbias2(0), n(&_n), out(0), delta(0), ndelta(0), dbias1(0), dbias2(0),
dweight1(n->weight.size(), 0), dweight1(n->weight.size(), 0),
dweight2(n->weight.size(), 0), dweight2(n->weight.size(), 0),
dxo(n->weight.size(), 0) {} dxo(n->weight.size(), 0) {}
void reset() void reset()
{ {
// underlaying neuron // underlaying neuron
n->reset(); n->reset();
// addons // addons
out = delta = ndelta = dbias1 = dbias2 = 0; out = delta = ndelta = dbias1 = dbias2 = 0;
fill(dweight1.begin(), dweight1.end(), 0); fill(dweight1.begin(), dweight1.end(), 0);
fill(dweight2.begin(), dweight2.end(), 0); fill(dweight2.begin(), dweight2.end(), 0);
fill(dxo.begin(), dxo.end(), 0); fill(dxo.begin(), dxo.end(), 0);
} }
real operator()(const vector& input) real operator()(const vector& input)
{ {
return out = mlp::sigmoid(n->bias + dbias1 + return out = mlp::sigmoid(n->bias + dbias1 +
(n->weight + dweight1) * input); (n->weight + dweight1) * input);
} }
}; };
std::ostream& operator<<(std::ostream& os, const neuron& n) std::ostream& operator<<(std::ostream& os, const neuron& n)
{ {
return os << *n.n << " " << n.out << " " << n.delta << " " return os << *n.n << " " << n.out << " " << n.delta << " "
<< n.ndelta << " " << n.dbias1 << " " << n.dbias2 << " " << n.ndelta << " " << n.dbias1 << " " << n.dbias2 << " "
<< n.dweight1 << " " << n.dweight2 << " " << n.dxo; << n.dweight1 << " " << n.dweight2 << " " << n.dxo;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// layer // layer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class layer: public std::vector<neuron> class layer: public std::vector<neuron>
{ {
public: public:
@ -102,16 +102,16 @@ namespace qp
void reset() void reset()
{ {
for(iterator n = begin(); n != end(); ++n) for(iterator n = begin(); n != end(); ++n)
n->reset(); n->reset();
} }
vector operator()(const vector& input) vector operator()(const vector& input)
{ {
vector output(size()); vector output(size());
for(unsigned i = 0; i < output.size(); ++i) for(unsigned i = 0; i < output.size(); ++i)
output[i] = (*this)[i](input); output[i] = (*this)[i](input);
return output; return output;
} }
}; };
@ -120,10 +120,10 @@ namespace qp
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// net // net
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class net: public std::vector<layer> class net: public std::vector<layer>
{ {
public: public:
net(mlp::net& n) //: std::vector<layer>(n.begin(), n.end()) { reset(); } net(mlp::net& n) //: std::vector<layer>(n.begin(), n.end()) { reset(); }
{ {
for (mlp::net::iterator l = n.begin(); l != n.end(); ++l) for (mlp::net::iterator l = n.begin(); l != n.end(); ++l)
@ -135,27 +135,27 @@ namespace qp
void reset() void reset()
{ {
for(iterator l = begin(); l != end(); ++l) for(iterator l = begin(); l != end(); ++l)
l->reset(); l->reset();
} }
real train(const set& ts, real train(const set& ts,
unsigned epochs, unsigned epochs,
real target_error, real target_error,
real tolerance, real tolerance,
real eta = eta_default, real eta = eta_default,
real momentum = alpha_default, real momentum = alpha_default,
real lambda = lambda_default) real lambda = lambda_default)
{ {
real error_ = max_real; real error_ = max_real;
while (epochs-- && error_ > target_error) while (epochs-- && error_ > target_error)
{ {
real last_error = error_; real last_error = error_;
init_delta(); init_delta();
error_ = error(ts); error_ = error(ts);
if (error_ < last_error + tolerance) if (error_ < last_error + tolerance)
{ {
coeff_adapt(eta, momentum, lambda); coeff_adapt(eta, momentum, lambda);
@ -170,10 +170,10 @@ namespace qp
error_ = last_error; error_ = last_error;
} }
} }
return error_; return error_;
} }
virtual real error(const set& ts) = 0; virtual real error(const set& ts) = 0;
// protected: // protected:
@ -185,7 +185,7 @@ namespace qp
input.swap(tmp); input.swap(tmp);
} }
} }
// private: // private:
void init_delta() void init_delta()
{ {
@ -193,11 +193,11 @@ namespace qp
for (layer::iterator n = l->begin(); n != l->end(); ++n) for (layer::iterator n = l->begin(); n != l->end(); ++n)
fill(n->dxo.begin(), n->dxo.end(), n->ndelta = 0.0); fill(n->dxo.begin(), n->dxo.end(), n->ndelta = 0.0);
} }
void coeff_adapt(real& eta, real& momentum, real& lambda) void coeff_adapt(real& eta, real& momentum, real& lambda)
{ {
real me = 0, mw = 0, ew = 0; real me = 0, mw = 0, ew = 0;
for (iterator l = begin(); l != end(); ++l) for (iterator l = begin(); l != end(); ++l)
for (layer::iterator n = l->begin(); n != l->end(); ++n) for (layer::iterator n = l->begin(); n != l->end(); ++n)
{ {
@ -205,7 +205,7 @@ namespace qp
mw += n->dweight1 * n->dweight1; mw += n->dweight1 * n->dweight1;
ew += n->dxo * n->dweight1; ew += n->dxo * n->dweight1;
} }
me = std::max(static_cast<real>(sqrt(me)), me_floor); me = std::max(static_cast<real>(sqrt(me)), me_floor);
mw = std::max(static_cast<real>(sqrt(mw)), mw_floor); mw = std::max(static_cast<real>(sqrt(mw)), mw_floor);
eta *= (1.0 + 0.5 * ew / ( me * mw)); eta *= (1.0 + 0.5 * ew / ( me * mw));
@ -213,11 +213,11 @@ namespace qp
lambda = lambda0 * me / mw; lambda = lambda0 * me / mw;
momentum = eta * lambda; momentum = eta * lambda;
#ifdef DEBUG #ifdef DEBUG
std::cout << me << " \t" << mw << " \t" << ew << " \t" std::cout << me << " \t" << mw << " \t" << ew << " \t"
<< eta << " \t" << momentum << " \t" << lambda << std::endl; << eta << " \t" << momentum << " \t" << lambda << std::endl;
#endif // DEBUG #endif // DEBUG
} }
void weight_update(unsigned size, bool fire, real eta, real momentum) void weight_update(unsigned size, bool fire, real eta, real momentum)
{ {
for (iterator l = begin(); l != end(); ++l) for (iterator l = begin(); l != end(); ++l)
@ -239,13 +239,13 @@ namespace qp
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
} // namespace qp } // namespace qp
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#endif // qp_h #endif // qp_h
// Local Variables: // Local Variables:
// mode:C++ // mode:C++
// End: // End:

View file

@ -160,14 +160,14 @@ template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T
{ {
std::copy(v.begin(), v.end() - 1, std::ostream_iterator<T>(os, " ")); std::copy(v.begin(), v.end() - 1, std::ostream_iterator<T>(os, " "));
os << v.back(); os << v.back();
} }
return os << '>'; return os << '>';
} }
template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& v) template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& v)
{ {
v.clear(); v.clear();
char c; char c;
is >> c; is >> c;
if (!is || c != '<') if (!is || c != '<')
@ -186,7 +186,7 @@ template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& v)
} }
} while (is && c != '>'); } while (is && c != '>');
} }
return is; return is;
} }
@ -194,11 +194,11 @@ template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& v)
// euclidean_distance // euclidean_distance
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
template<class T> T euclidean_distance(const std::vector<T>& v1, template<class T> T euclidean_distance(const std::vector<T>& v1,
const std::vector<T>& v2) const std::vector<T>& v2)
{ {
T sum = 0, tmp; T sum = 0, tmp;
for (unsigned i = 0; i < v1.size(); ++i) for (unsigned i = 0; i < v1.size(); ++i)
{ {
tmp = v1[i] - v2[i]; tmp = v1[i] - v2[i];
@ -211,4 +211,3 @@ template<class T> T euclidean_distance(const std::vector<T>& v1,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#endif #endif

View file

@ -18,8 +18,8 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
SET (GPSYMREG_SOURCES main.cpp) SET (GPSYMREG_SOURCES main.cpp)
# no matter what is the OS, hopefully # no matter what is the OS, hopefully
ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES}) ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES})
ADD_DEPENDENCIES(gpsymreg eo eoutils) ADD_DEPENDENCIES(gpsymreg eo eoutils)
###################################################################################### ######################################################################################
@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
TARGET_LINK_LIBRARIES(gpsymreg eo eoutils) TARGET_LINK_LIBRARIES(gpsymreg eo eoutils)
###################################################################################### ######################################################################################

View file

@ -14,7 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
jeggermo@liacs.nl jeggermo@liacs.nl
*/ */
#ifndef _FITNESS_FUNCTION_H #ifndef _FITNESS_FUNCTION_H
@ -225,4 +225,3 @@ class RegFitness: public eoEvalFunc< eoParseTree<FitnessType, Node> >
}; };
#endif #endif

View file

@ -30,7 +30,7 @@
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
jeggermo@liacs.nl jeggermo@liacs.nl
*/ */
@ -146,25 +146,25 @@ int main(int argc, char *argv[])
// the parameters are passed on as well // the parameters are passed on as well
RegFitness eval(generationCounter, initSequence, parameter); RegFitness eval(generationCounter, initSequence, parameter);
// Depth Initializor, set for Ramped Half and Half Initialization // Depth Initializor, set for Ramped Half and Half Initialization
eoParseTreeDepthInit<FitnessType, Node> initializer(parameter.InitMaxDepth, initSequence, true, true); eoParseTreeDepthInit<FitnessType, Node> initializer(parameter.InitMaxDepth, initSequence, true, true);
// create the initial population // create the initial population
Pop pop(parameter.population_size, initializer); Pop pop(parameter.population_size, initializer);
// and evaluate the individuals // and evaluate the individuals
apply<EoType>(eval, pop); apply<EoType>(eval, pop);
@ -335,10 +335,3 @@ int main(int argc, char *argv[])
} }

View file

@ -3,18 +3,18 @@
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this library; if not, write to the Free Software along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
jeggermo@liacs.nl jeggermo@liacs.nl
*/ */
#ifndef _NODE_H #ifndef _NODE_H
@ -33,13 +33,13 @@ using namespace std;
/* A new Operation and Node class for even more flexibility. /* A new Operation and Node class for even more flexibility.
Improvements over the t-eoSymreg code are: Improvements over the t-eoSymreg code are:
* No hardcoded functions or operators. The Operation and Node class below * No hardcoded functions or operators. The Operation and Node class below
allow you to specify your own unary and binary functions as well as allow you to specify your own unary and binary functions as well as
binary operators (like +,-,*,/). Moreover you can detemine if you want binary operators (like +,-,*,/). Moreover you can detemine if you want
to allow primitve subroutines with either one or two arguments. to allow primitve subroutines with either one or two arguments.
If a Node has a subroutine Operation it will take evaluate the first If a Node has a subroutine Operation it will take evaluate the first
(and possible second) child branch and use them as input variables for (and possible second) child branch and use them as input variables for
the remaining second (or third) child branch. the remaining second (or third) child branch.
*/ */
@ -47,20 +47,20 @@ using namespace std;
typedef enum {Variable, UFunction, BFunction, BOperator, Const} Type; typedef enum {Variable, UFunction, BFunction, BOperator, Const} Type;
typedef double (*BinaryFunction)(const double,const double); typedef double (*BinaryFunction)(const double,const double);
typedef double (*UnaryFunction)(const double); typedef double (*UnaryFunction)(const double);
struct Operation struct Operation
{ {
public: public:
typedef unsigned int VariableID; typedef unsigned int VariableID;
typedef string Label; typedef string Label;
// if your compiler allows you to have nameless unions you can make this a // if your compiler allows you to have nameless unions you can make this a
// union by removing the //'s below // union by removing the //'s below
//union //union
//{ //{
UnaryFunction uFunction; UnaryFunction uFunction;
@ -68,34 +68,34 @@ struct Operation
VariableID id; VariableID id;
double constant; double constant;
//}; //};
Label label; Label label;
Type type; Type type;
// the default constructor results in a constant with value 0 // the default constructor results in a constant with value 0
Operation() : constant(0), label("0"), type(Const){}; Operation() : constant(0), label("0"), type(Const){};
// two possible constructors for Unary Functions // two possible constructors for Unary Functions
Operation(UnaryFunction _uf, Label _label): uFunction(_uf), label(_label), type(UFunction) {}; Operation(UnaryFunction _uf, Label _label): uFunction(_uf), label(_label), type(UFunction) {};
Operation(Label _label, UnaryFunction _uf): uFunction(_uf), label(_label), type(UFunction) {}; Operation(Label _label, UnaryFunction _uf): uFunction(_uf), label(_label), type(UFunction) {};
// Watch out there are two constructors using pointers two binary functions: // Watch out there are two constructors using pointers two binary functions:
// Binary Function (printed as label(subtree0,subtree1) (e.g. pow(x,y)) // Binary Function (printed as label(subtree0,subtree1) (e.g. pow(x,y))
// Binary Operator (printed as (subtree0 label subtree1) (e.g. x^y) // Binary Operator (printed as (subtree0 label subtree1) (e.g. x^y)
// The difference is purely cosmetic. // The difference is purely cosmetic.
// If you specify the label before the function pointer -> Binary Function // If you specify the label before the function pointer -> Binary Function
Operation(Label _label, BinaryFunction _bf): bFunction(_bf), label(_label), type(BFunction) {}; Operation(Label _label, BinaryFunction _bf): bFunction(_bf), label(_label), type(BFunction) {};
// If you specify the function pointer before the label -> Binary Operator // If you specify the function pointer before the label -> Binary Operator
Operation(BinaryFunction _bf, Label _label): bFunction(_bf), label(_label), type(BOperator) {}; Operation(BinaryFunction _bf, Label _label): bFunction(_bf), label(_label), type(BOperator) {};
// A constructor for variables // A constructor for variables
Operation(VariableID _id, Label _label): id(_id), label(_label), type(Variable) {}; Operation(VariableID _id, Label _label): id(_id), label(_label), type(Variable) {};
// A constructor for constants // A constructor for constants
Operation(double _constant, Label _label): constant(_constant), label(_label), type(Const) {}; Operation(double _constant, Label _label): constant(_constant), label(_label), type(Const) {};
Operation(const Operation &_op) Operation(const Operation &_op)
{ {
switch(_op.type) switch(_op.type)
@ -110,7 +110,7 @@ struct Operation
label = _op.label; label = _op.label;
}; };
virtual ~Operation(){}; virtual ~Operation(){};
}; };
@ -118,14 +118,14 @@ class Node
{ {
private: private:
Operation op; Operation op;
public: public:
Node(void): op(Operation()){}; Node(void): op(Operation()){};
Node(Operation &_op) : op(_op){}; Node(Operation &_op) : op(_op){};
virtual ~Node(void) {} virtual ~Node(void) {}
int arity(void) const int arity(void) const
{ {
switch(op.type) switch(op.type)
{ {
@ -134,53 +134,53 @@ class Node
case BFunction: return 2; case BFunction: return 2;
case BOperator: return 2; case BOperator: return 2;
case Const: return 0; case Const: return 0;
} }
return 0; return 0;
} }
void randomize(void) {} void randomize(void) {}
template<class Children> template<class Children>
void operator()(double& result, Children args, vector<double> &var) const void operator()(double& result, Children args, vector<double> &var) const
{ {
double result0; double result0;
double result1; double result1;
switch(op.type) switch(op.type)
{ {
case Variable: result = var[op.id%var.size()]; //%var.size() used in the case of Subroutines and as a security measure case Variable: result = var[op.id%var.size()]; //%var.size() used in the case of Subroutines and as a security measure
break; break;
case UFunction: args[0].apply(result0, var); case UFunction: args[0].apply(result0, var);
result = op.uFunction(result0); result = op.uFunction(result0);
break; break;
case BFunction: case BFunction:
case BOperator: args[0].apply(result0, var); case BOperator: args[0].apply(result0, var);
args[1].apply(result1, var); args[1].apply(result1, var);
result = op.bFunction(result0,result1); result = op.bFunction(result0,result1);
break; break;
case Const: result = op.constant; case Const: result = op.constant;
break; break;
} }
} }
template<class Children> template<class Children>
void operator()(string& result, Children args) const void operator()(string& result, Children args) const
{ {
string subtree0; string subtree0;
string subtree1; string subtree1;
string subtree2; string subtree2;
switch(op.type) switch(op.type)
{ {
case Variable: case Variable:
case Const: result += op.label; case Const: result += op.label;
break; break;
case UFunction: result += op.label; case UFunction: result += op.label;
result += "("; result += "(";
args[0].apply(subtree0); args[0].apply(subtree0);
@ -195,7 +195,7 @@ class Node
args[1].apply(subtree1); args[1].apply(subtree1);
result += subtree1; result += subtree1;
result += ")"; result += ")";
break; break;
case BOperator: result += "("; case BOperator: result += "(";
args[0].apply(subtree0); args[0].apply(subtree0);
result += subtree0; result += subtree0;
@ -204,16 +204,16 @@ class Node
result += subtree1; result += subtree1;
result += ")"; result += ")";
break; break;
default: result += "ERROR in Node::operator(string,...) \n"; break; default: result += "ERROR in Node::operator(string,...) \n"; break;
} }
} }
Operation getOp(void) const {return op;} Operation getOp(void) const {return op;}
}; };
@ -230,7 +230,7 @@ class Node
std::ostream& operator<<(std::ostream& os, const Node& eot) std::ostream& operator<<(std::ostream& os, const Node& eot)
{ {
Operation op(eot.getOp()); Operation op(eot.getOp());
os << (eot.getOp()).label; os << (eot.getOp()).label;
return os; return os;
} }

View file

@ -3,18 +3,18 @@
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this library; if not, write to the Free Software along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
jeggermo@liacs.nl jeggermo@liacs.nl
*/ */
#ifndef _PARAMETERS_FUNCTION_H #ifndef _PARAMETERS_FUNCTION_H
@ -28,7 +28,7 @@ using namespace std;
struct Parameters{ struct Parameters{
unsigned int nGenerations; // -G unsigned int nGenerations; // -G
unsigned population_size; // -P unsigned population_size; // -P
unsigned offspring_size; // -O unsigned offspring_size; // -O
unsigned int MaxSize; // -S unsigned int MaxSize; // -S
unsigned int InitMaxDepth; // -D unsigned int InitMaxDepth; // -D
@ -41,72 +41,72 @@ struct Parameters{
Parameters(int argc, char **argv) Parameters(int argc, char **argv)
{ {
eoParser parser(argc,argv); eoParser parser(argc,argv);
// generations // generations
eoValueParam<unsigned int> paramGenerations(1, "generations", "Generations", 'G', false); eoValueParam<unsigned int> paramGenerations(1, "generations", "Generations", 'G', false);
parser.processParam( paramGenerations ); parser.processParam( paramGenerations );
nGenerations = paramGenerations.value(); nGenerations = paramGenerations.value();
cerr << "nGenerations= " << nGenerations << endl; cerr << "nGenerations= " << nGenerations << endl;
// populationsize // populationsize
eoValueParam<unsigned int> paramPopulationSize(10, "populationsize", "PopulationSize", 'P', false); eoValueParam<unsigned int> paramPopulationSize(10, "populationsize", "PopulationSize", 'P', false);
parser.processParam( paramPopulationSize ); parser.processParam( paramPopulationSize );
population_size = paramPopulationSize.value(); population_size = paramPopulationSize.value();
cerr << "population_size= " << population_size << endl; cerr << "population_size= " << population_size << endl;
// offspringsize // offspringsize
eoValueParam<unsigned int> paramOffspringSize(population_size, "offspringsize", "OffspringSize", 'O', false); eoValueParam<unsigned int> paramOffspringSize(population_size, "offspringsize", "OffspringSize", 'O', false);
parser.processParam( paramOffspringSize ); parser.processParam( paramOffspringSize );
offspring_size = paramOffspringSize.value(); offspring_size = paramOffspringSize.value();
cerr << "offspring_size= " << offspring_size << endl; cerr << "offspring_size= " << offspring_size << endl;
// maxsize // maxsize
eoValueParam<unsigned int> paramMaxSize(15, "maxsize", "MaxSize", 'S', false); eoValueParam<unsigned int> paramMaxSize(15, "maxsize", "MaxSize", 'S', false);
parser.processParam( paramMaxSize ); parser.processParam( paramMaxSize );
MaxSize = paramMaxSize.value(); MaxSize = paramMaxSize.value();
cerr << "MaxSize= " << MaxSize << endl; cerr << "MaxSize= " << MaxSize << endl;
// initialmaxdepth // initialmaxdepth
eoValueParam<unsigned int> paramInitialMaxDepth(4, "initialmaxdepth", "InitialMaxDepth", 'D', false); eoValueParam<unsigned int> paramInitialMaxDepth(4, "initialmaxdepth", "InitialMaxDepth", 'D', false);
parser.processParam( paramInitialMaxDepth ); parser.processParam( paramInitialMaxDepth );
InitMaxDepth = paramInitialMaxDepth.value(); InitMaxDepth = paramInitialMaxDepth.value();
cerr << "InitMaxDepth= " << InitMaxDepth << endl; cerr << "InitMaxDepth= " << InitMaxDepth << endl;
// randomseed // randomseed
eoValueParam<unsigned int> paramRandomSeed(1, "randomseed", "Random Seed", 'R', false); eoValueParam<unsigned int> paramRandomSeed(1, "randomseed", "Random Seed", 'R', false);
parser.processParam( paramRandomSeed ); parser.processParam( paramRandomSeed );
randomseed = paramRandomSeed.value(); randomseed = paramRandomSeed.value();
cerr << "randomseed= " << randomseed << endl; cerr << "randomseed= " << randomseed << endl;
// crossover-rate // crossover-rate
eoValueParam<double> paramXover(0.75, "crossoverrate", "crossover rate", 'x', false); eoValueParam<double> paramXover(0.75, "crossoverrate", "crossover rate", 'x', false);
parser.processParam(paramXover ); parser.processParam(paramXover );
xover_rate = paramXover.value(); xover_rate = paramXover.value();
cerr << "xover_rate= " << xover_rate << endl; cerr << "xover_rate= " << xover_rate << endl;
//mutation-rate //mutation-rate
eoValueParam<double> paramMutation(0.25, "mutationrate", "mutation rate", 'm', false); eoValueParam<double> paramMutation(0.25, "mutationrate", "mutation rate", 'm', false);
parser.processParam(paramMutation ); parser.processParam(paramMutation );
mutation_rate = paramMutation.value(); mutation_rate = paramMutation.value();
cerr << "mutation_rate= " << mutation_rate << endl; cerr << "mutation_rate= " << mutation_rate << endl;
//tournament size //tournament size
eoValueParam<unsigned int > paramTournamentSize(5, "tournamentsize", "tournament size", 't', false); eoValueParam<unsigned int > paramTournamentSize(5, "tournamentsize", "tournament size", 't', false);
parser.processParam(paramTournamentSize ); parser.processParam(paramTournamentSize );
tournamentsize = paramTournamentSize.value(); tournamentsize = paramTournamentSize.value();
cerr << "Tournament Size= " << tournamentsize << endl; cerr << "Tournament Size= " << tournamentsize << endl;
if (parser.userNeedsHelp()) if (parser.userNeedsHelp())
{ {
parser.printHelp(cout); parser.printHelp(cout);
exit(1); exit(1);
} }
}; };
~Parameters(){}; ~Parameters(){};
}; };
#endif #endif

View file

@ -18,8 +18,8 @@ LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
SET (MASTERMIND_SOURCES mastermind.cpp) SET (MASTERMIND_SOURCES mastermind.cpp)
# no matter what is the OS, hopefully # no matter what is the OS, hopefully
ADD_EXECUTABLE(mastermind ${MASTERMIND_SOURCES}) ADD_EXECUTABLE(mastermind ${MASTERMIND_SOURCES})
ADD_DEPENDENCIES(mastermind eo eoutils) ADD_DEPENDENCIES(mastermind eo eoutils)
###################################################################################### ######################################################################################
@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(mastermind PROPERTIES VERSION "${MASTERMIND_VERSION}")
TARGET_LINK_LIBRARIES(mastermind eo eoutils) TARGET_LINK_LIBRARIES(mastermind eo eoutils)
###################################################################################### ######################################################################################

View file

@ -51,8 +51,8 @@ int main(int argc, char** argv)
} }
catch (exception& e) catch (exception& e)
{ {
cerr << argv[0] << ": " << e.what() << endl; cerr << argv[0] << ": " << e.what() << endl;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
return 0; return 0;

170
eo/config.guess vendored
View file

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-03-03' timestamp='2011-05-05'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -186,7 +186,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi fi
;; ;;
*) *)
os=netbsd os=netbsd
;; ;;
esac esac
# The OS release # The OS release
@ -270,7 +270,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;; ;;
*5.*) *5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;; ;;
esac esac
# According to Compaq, /usr/sbin/psrinfo has been available on # According to Compaq, /usr/sbin/psrinfo has been available on
@ -342,7 +342,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo i370-ibm-openedition echo i370-ibm-openedition
exit 0 ;; exit 0 ;;
*:OS400:*:*) *:OS400:*:*)
echo powerpc-ibm-os400 echo powerpc-ibm-os400
exit 0 ;; exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE} echo arm-acorn-riscix${UNAME_RELEASE}
@ -419,23 +419,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should # MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem. # be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE} echo m68k-milan-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE} echo m68k-hades-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE} echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
m68k:machten:*:*) m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE} echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -504,8 +504,8 @@ EOF
echo m88k-motorola-sysv3 echo m88k-motorola-sysv3
exit 0 ;; exit 0 ;;
AViiON:dgux:*:*) AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures # DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p` UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@ -614,52 +614,52 @@ EOF
9000/[678][0-9][0-9]) 9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0 532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;; 32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;; 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;; esac ;;
esac esac
fi fi
if [ "${HP_ARCH}" = "" ]; then if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE #define _HPUX_SOURCE
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
int main () int main ()
{ {
#if defined(_SC_KERNEL_BITS) #if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS); long bits = sysconf(_SC_KERNEL_BITS);
#endif #endif
long cpu = sysconf (_SC_CPU_VERSION); long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu) switch (cpu)
{ {
case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0: case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS) #if defined(_SC_KERNEL_BITS)
switch (bits) switch (bits)
{ {
case 64: puts ("hppa2.0w"); break; case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break; case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break; default: puts ("hppa2.0"); break;
} break; } break;
#else /* !defined(_SC_KERNEL_BITS) */ #else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break; puts ("hppa2.0"); break;
#endif #endif
default: puts ("hppa1.0"); break; default: puts ("hppa1.0"); break;
} }
exit (0); exit (0);
} }
EOF EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa test -z "$HP_ARCH" && HP_ARCH=hppa
@ -739,22 +739,22 @@ EOF
exit 0 ;; exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd echo c1-convex-bsd
exit 0 ;; exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc if getsysinfo -f scalar_acc
then echo c32-convex-bsd then echo c32-convex-bsd
else echo c2-convex-bsd else echo c2-convex-bsd
fi fi
exit 0 ;; exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd echo c34-convex-bsd
exit 0 ;; exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd echo c38-convex-bsd
exit 0 ;; exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd echo c4-convex-bsd
exit 0 ;; exit 0 ;;
CRAY*Y-MP:*:*:*) CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
@ -778,14 +778,14 @@ EOF
exit 0 ;; exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;; exit 0 ;;
5000:UNIX_System_V:4.*:*) 5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;; exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@ -919,7 +919,7 @@ EOF
EV6) UNAME_MACHINE=alphaev6 ;; EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;; EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;; EV68*) UNAME_MACHINE=alphaev68 ;;
esac esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
@ -961,7 +961,7 @@ EOF
s/.*supported targets: *// s/.*supported targets: *//
s/ .*// s/ .*//
p'` p'`
case "$ld_supported_targets" in case "$ld_supported_targets" in
elf32-i386) elf32-i386)
TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
;; ;;
@ -1013,11 +1013,11 @@ EOF
echo i386-sequent-sysv4 echo i386-sequent-sysv4
exit 0 ;; exit 0 ;;
i*86:UNIX_SV:4.2MP:2.*) i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version # Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2... # number series starting with 2...
# I am not positive that other SVR4 systems won't match this, # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms. # I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it. # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;; exit 0 ;;
i*86:OS/2:*:*) i*86:OS/2:*:*)
@ -1076,10 +1076,10 @@ EOF
exit 0 ;; exit 0 ;;
pc:*:*:*) pc:*:*:*)
# Left here for compatibility: # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about # uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386. # the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp echo i386-pc-msdosdjgpp
exit 0 ;; exit 0 ;;
Intel:Mach:3*:*) Intel:Mach:3*:*)
echo i386-pc-mach3 echo i386-pc-mach3
exit 0 ;; exit 0 ;;
@ -1114,8 +1114,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;; && echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE} echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1149,9 +1149,9 @@ EOF
fi fi
exit 0 ;; exit 0 ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV> # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4 echo i586-unisys-sysv4
exit 0 ;; exit 0 ;;
*:UNIX_System_V:4*:FTX*) *:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>. # From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm # How about differentiating between stratus architectures? -djm
@ -1173,11 +1173,11 @@ EOF
exit 0 ;; exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE} echo mips-nec-sysv${UNAME_RELEASE}
else else
echo mips-unknown-sysv${UNAME_RELEASE} echo mips-unknown-sysv${UNAME_RELEASE}
fi fi
exit 0 ;; exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos echo powerpc-be-beos
exit 0 ;; exit 0 ;;
@ -1262,7 +1262,7 @@ EOF
echo pdp10-unknown-its echo pdp10-unknown-its
exit 0 ;; exit 0 ;;
SEI:*:*:SEIUX) SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE} echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:DragonFly:*:*) *:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
@ -1289,11 +1289,11 @@ main ()
#include <sys/param.h> #include <sys/param.h>
printf ("m68k-sony-newsos%s\n", printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4 #ifdef NEWSOS4
"4" "4"
#else #else
"" ""
#endif #endif
); exit (0); ); exit (0);
#endif #endif
#endif #endif

View file

@ -71,5 +71,3 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */ /* Define to `unsigned int' if <sys/types.h> does not define. */
#cmakedefine size_t #cmakedefine size_t

View file

@ -19,8 +19,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
Marc.Schoenauer@polytechnique.fr Marc.Schoenauer@polytechnique.fr
mak@dhi.dk mak@dhi.dk
*/ */
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -43,7 +43,7 @@ public:
eoInitVirus(unsigned _combien, eoRndGenerator<bool>& _generator ) eoInitVirus(unsigned _combien, eoRndGenerator<bool>& _generator )
: combien(_combien), generator(_generator) {} : combien(_combien), generator(_generator) {}
virtual void operator()( eoVirus<FitT>& chrom) virtual void operator()( eoVirus<FitT>& chrom)
{ {
chrom.resize(combien); chrom.resize(combien);
@ -54,7 +54,7 @@ public:
} }
chrom.invalidate(); chrom.invalidate();
} }
private : private :
unsigned combien; unsigned combien;
/// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics
@ -68,7 +68,7 @@ public:
eoInitVirus1bit(unsigned _combien, eoRndGenerator<bool>& _generator ) eoInitVirus1bit(unsigned _combien, eoRndGenerator<bool>& _generator )
: combien(_combien), generator(_generator) {} : combien(_combien), generator(_generator) {}
virtual void operator()( eoVirus<FitT>& chrom) virtual void operator()( eoVirus<FitT>& chrom)
{ {
chrom.resize(combien); chrom.resize(combien);
@ -77,7 +77,7 @@ public:
chrom.virusBitSet(0, true ); chrom.virusBitSet(0, true );
chrom.invalidate(); chrom.invalidate();
} }
private : private :
unsigned combien; unsigned combien;
/// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics

View file

@ -1,8 +1,8 @@
// Boost config.hpp configuration header file ------------------------------// // Boost config.hpp configuration header file ------------------------------//
// (C) Copyright John Maddock 2002. // (C) Copyright John Maddock 2002.
// Use, modification and distribution are subject to the // Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file // Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for most recent version. // See http://www.boost.org/libs/config for most recent version.
@ -57,14 +57,3 @@
#include <boost/config/suffix.hpp> #include <boost/config/suffix.hpp>
#endif // BOOST_CONFIG_HPP #endif // BOOST_CONFIG_HPP

View file

@ -1,7 +1,7 @@
// abi_prefix header -------------------------------------------------------// // abi_prefix header -------------------------------------------------------//
// © Copyright John Maddock 2003 // © Copyright John Maddock 2003
// Use, modification and distribution are subject to the Boost Software License, // Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt). // http://www.boost.org/LICENSE_1_0.txt).

View file

@ -1,7 +1,7 @@
// abi_sufffix header -------------------------------------------------------// // abi_sufffix header -------------------------------------------------------//
// © Copyright John Maddock 2003 // © Copyright John Maddock 2003
// Use, modification and distribution are subject to the Boost Software License, // Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt). // http://www.boost.org/LICENSE_1_0.txt).
@ -19,5 +19,3 @@
#ifdef BOOST_HAS_ABI_HEADERS #ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_SUFFIX # include BOOST_ABI_SUFFIX
#endif #endif

View file

@ -18,13 +18,13 @@ USAGE:
Before including this header you must define one or more of define the following macros: Before including this header you must define one or more of define the following macros:
BOOST_LIB_NAME: Required: A string containing the basename of the library, BOOST_LIB_NAME: Required: A string containing the basename of the library,
for example boost_regex. for example boost_regex.
BOOST_LIB_TOOLSET: Optional: the base name of the toolset. BOOST_LIB_TOOLSET: Optional: the base name of the toolset.
BOOST_DYN_LINK: Optional: when set link to dll rather than static library. BOOST_DYN_LINK: Optional: when set link to dll rather than static library.
BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
of the library selected (useful for debugging). of the library selected (useful for debugging).
BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
rather than a mangled-name version. rather than a mangled-name version.
These macros will be undef'ed at the end of the header, further this header These macros will be undef'ed at the end of the header, further this header
has no include guards - so be sure to include it only once from your library! has no include guards - so be sure to include it only once from your library!
@ -56,13 +56,13 @@ BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
contains one or more of the following letters after contains one or more of the following letters after
a hiphen: a hiphen:
s static runtime (dynamic if not present). s static runtime (dynamic if not present).
d debug build (release if not present). d debug build (release if not present).
g debug/diagnostic runtime (release if not present). g debug/diagnostic runtime (release if not present).
p STLPort Build. p STLPort Build.
BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
@ -342,13 +342,3 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
#if defined(BOOST_AUTO_LINK_NOMANGLE) #if defined(BOOST_AUTO_LINK_NOMANGLE)
# undef BOOST_AUTO_LINK_NOMANGLE # undef BOOST_AUTO_LINK_NOMANGLE
#endif #endif

View file

@ -1,5 +1,4 @@
// (C) Copyright John maddock 1999.
// (C) Copyright John maddock 1999.
// (C) David Abrahams 2002. Distributed under the Boost // (C) David Abrahams 2002. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file // Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -33,7 +32,7 @@
namespace std namespace std
{ {
template<> template<>
class numeric_limits<BOOST_LLT> class numeric_limits<BOOST_LLT>
{ {
public: public:
@ -82,11 +81,11 @@ namespace std
BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, traps = false);
BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
}; };
template<> template<>
class numeric_limits<BOOST_ULLT> class numeric_limits<BOOST_ULLT>
{ {
public: public:
@ -135,9 +134,9 @@ namespace std
BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, traps = false);
BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
}; };
} }
#endif #endif
#endif #endif

View file

@ -4,7 +4,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// eoAge.h // eoAge.h
// (c) GeNeura Team, 1998 // (c) GeNeura Team, 1998
/* /*
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
@ -38,7 +38,7 @@ using namespace std;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/** eoAge is a template class that adds an age to an object.\\ /** eoAge is a template class that adds an age to an object.\\
Requisites for template instantiation are that the object must admit a default ctor Requisites for template instantiation are that the object must admit a default ctor
and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className,
printOn, readFrom. printOn, readFrom.
@see eoObject @see eoObject
@ -55,7 +55,7 @@ class eoAged: public Object
/// Virtual dtor. They are needed in virtual class hierarchies /// Virtual dtor. They are needed in virtual class hierarchies
virtual ~eoAged() {}; virtual ~eoAged() {};
///returns the age of the object ///returns the age of the object
unsigned long Age() const {return age;} unsigned long Age() const {return age;}
@ -67,7 +67,7 @@ class eoAged: public Object
readFrom and printOn are directly inherited from eo1d readFrom and printOn are directly inherited from eo1d
*/ */
//@{ //@{
/** Return the class id. This should be redefined in each class; but /** Return the class id. This should be redefined in each class; but
it's got code as an example of implementation. Only "leaf" classes it's got code as an example of implementation. Only "leaf" classes
can be non-virtual. can be non-virtual.
*/ */
@ -83,7 +83,7 @@ class eoAged: public Object
_is >> age; _is >> age;
} }
/** /**
* Write object. It's called printOn since it prints the object _on_ a stream. * Write object. It's called printOn since it prints the object _on_ a stream.
* @param _os A ostream. * @param _os A ostream.
@ -93,7 +93,7 @@ class eoAged: public Object
_os << age; _os << age;
} }
//@} //@}
private: private:
/** Default Constructor. \\ /** Default Constructor. \\
@ -106,4 +106,3 @@ class eoAged: public Object
}; };
#endif EOAGE_H #endif EOAGE_H

View file

@ -1,9 +1,9 @@
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// eoDrawable.h // eoDrawable.h
// (c) GeNeura Team, 1999 // (c) GeNeura Team, 1999
/* /*
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
@ -27,38 +27,38 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
using namespace std; using namespace std;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// eoDrawable // eoDrawable
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/** eoDrawable is a template class that adds a drawing interface to an object.\\ /** eoDrawable is a template class that adds a drawing interface to an object.
Requisites for template instantiation are that the object must admit a default ctor Requisites for template instantiation are that the object must admit a default ctor
and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className,
eoDrawables can be drawn on any two-dimensional surface; it can be added to any eoDrawables can be drawn on any two-dimensional surface; it can be added to any
object with above characteristics. object with above characteristics.
@see eoObject @see eoObject
*/ */
template <class Object> template <class Object>
class eoDrawable class eoDrawable
{ {
public: public:
/// Main ctor from an already built Object. /// Main ctor from an already built Object.
eoDrawable( const Object& _o): Object( _o ){}; eoDrawable( const Object& _o): Object( _o ){};
/// Copy constructor. /// Copy constructor.
eoDrawable( const eoDrawable& _d): Object( _d ){}; eoDrawable( const eoDrawable& _d): Object( _d ){};
/// Virtual dtor. They are needed in virtual class hierarchies
virtual ~eoDrawable() {};
/**Draws the object. It must be redefined in any subclass, it´s impossible
to have a general drawing method
@param _x, _y coorinates */
virtual void draw( unsigned _x, unsigned _y) = 0;
};
#endif EODRAWABLE_H /// Virtual dtor. They are needed in virtual class hierarchies
virtual ~eoDrawable() {};
/**Draws the object. It must be redefined in any subclass, it´s impossible
to have a general drawing method
@param _x, _y coorinates */
virtual void draw( unsigned _x, unsigned _y) = 0;
};
#endif //! EODRAWABLE_H

View file

@ -9,9 +9,9 @@ PREFIX = "/usr"
DATA = { DATA = {
'dirs': [ "%s/share/%s" % (PREFIX, NAME) ], 'dirs': [ "%s/share/%s" % (PREFIX, NAME) ],
'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)), 'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)),
("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)),
("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)),
] ]
} }
LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"] LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"]
@ -21,8 +21,8 @@ import os, sys
def isroot(): def isroot():
if os.getuid() != 0: if os.getuid() != 0:
print '[WARNING] you have to be root' print '[WARNING] you have to be root'
return False return False
return True return True
def uninstall(): def uninstall():
@ -41,11 +41,11 @@ def data():
if __name__ == '__main__': if __name__ == '__main__':
if not isroot(): if not isroot():
sys.exit() sys.exit()
if len(sys.argv) < 2: if len(sys.argv) < 2:
print 'Usage: %s [install|uninstall|data]' % sys.argv[0] print 'Usage: %s [install|uninstall|data]' % sys.argv[0]
sys.exit() sys.exit()
if sys.argv[1] == 'install': install() if sys.argv[1] == 'install': install()
elif sys.argv[1] == 'uninstall': uninstall() elif sys.argv[1] == 'uninstall': uninstall()

View file

@ -14,12 +14,12 @@
* test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to
avoid compiler warnings. avoid compiler warnings.
2006-07-02 Thomas Legrand <thomas.legrand@inria.fr> 2006-07-02 Thomas Legrand <thomas.legrand@inria.fr>
* test/t-eoEasyPSO.cpp: added PSO test * test/t-eoEasyPSO.cpp: added PSO test
* test/Makefile.am: added PSO test * test/Makefile.am: added PSO test
@ -28,9 +28,9 @@
* test/t-eoSyncEasyPSO.cpp: added synchronous PSO test * test/t-eoSyncEasyPSO.cpp: added synchronous PSO test
* test/t-eoEasyPSO.cpp: customized PSO test (initialization) * test/t-eoEasyPSO.cpp: customized PSO test (initialization)
* test/Makefile.am: added synchronous PSO test * test/Makefile.am: added synchronous PSO test
* Local Variables: * Local Variables:
* coding: iso-8859-1 * coding: iso-8859-1
* mode: flyspell * mode: flyspell
* fill-column: 80 * fill-column: 80
* End: * End:

View file

@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
Marc.Schoenauer@polytechnique.fr Marc.Schoenauer@polytechnique.fr
CVS Info: $Date: 2001-06-21 12:03:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.3 2001-06-21 12:03:17 jmerelo Exp $ $Author: jmerelo $ CVS Info: $Date: 2001-06-21 12:03:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.3 2001-06-21 12:03:17 jmerelo Exp $ $Author: jmerelo $
*/ */
@ -51,7 +51,7 @@ class RoyalRoad: public eoEvalFunc<EOT> {
_eo.fitness( fitness ); _eo.fitness( fitness );
} }
}; };
private: private:
unsigned div; unsigned div;

View file

@ -4,7 +4,7 @@
/** Just the simple function that takes binary value of a chromosome and sets /** Just the simple function that takes binary value of a chromosome and sets
the fitnes. the fitnes.
@param _chrom A binary chromosome @param _chrom A binary chromosome
*/ */
template <class Chrom> double binary_value(const Chrom& _chrom) template <class Chrom> double binary_value(const Chrom& _chrom)

View file

@ -5,11 +5,11 @@ import sys
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) < 2: if len(sys.argv) < 2:
print 'Usage: boxplot.py [Results files, ...]' print 'Usage: boxplot.py [Results files, ...]'
sys.exit() sys.exit()
for i in range(1, len(sys.argv)): for i in range(1, len(sys.argv)):
pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] )
pylab.xlabel('iterations') pylab.xlabel('iterations')
pylab.show() pylab.show()

View file

@ -101,7 +101,7 @@ struct fitness_traits< pair<Performance, Worth> >
/* end fitness_traits.h */ /* end fitness_traits.h */
/* EO.h /* EO.h
The Fitness template argument is there for backward compatibility reasons The Fitness template argument is there for backward compatibility reasons
@ -236,7 +236,7 @@ public :
{ {
if (!fitness_traits::needs_mapping) if (!fitness_traits::needs_mapping)
{ {
throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined"); throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined");
} }
(*p2w)(*this); (*p2w)(*this);
@ -429,5 +429,3 @@ int main()
std::cout << e.what() << std::endl; std::cout << e.what() << std::endl;
} }
} }

View file

@ -2,8 +2,8 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/** Just a simple function that takes an eoEsBase<double> and sets the fitnes /** Just a simple function that takes an eoEsBase<double> and sets the fitnes
to sphere to sphere
@param _ind vector<double> @param _ind vector<double>
*/ */
@ -14,6 +14,3 @@ double real_value(const std::vector<double>& _ind)
sum += _ind[i] * _ind[i]; sum += _ind[i] * _ind[i];
return sum/_ind.size(); return sum/_ind.size();
} }

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
echo "Testing -h" echo "Testing -h"
./t-eoCheckpointing -h ./t-eoCheckpointing -h
echo "Finished" echo "Finished"

View file

@ -8,8 +8,7 @@ int main()
// EO objects can be printed with stream operators // EO objects can be printed with stream operators
std::cout << "chrom1 = " << chrom1 << std::endl std::cout << "chrom1 = " << chrom1 << std::endl
<< "chrom2 = " << chrom2 << std::endl; << "chrom2 = " << chrom2 << std::endl;
return 0; return 0;
} }

View file

@ -37,14 +37,14 @@ main()
C c1( 5,6,1 ); C c1( 5,6,1 );
cout << "Default constructor with values: " << endl cout << "Default constructor with values: " << endl
<< c1 << endl; << c1 << endl;
} }
{ {
eoUniform<T> aleat( 1,10 ); eoUniform<T> aleat( 1,10 );
C c1( 5,6, aleat ); C c1( 5,6, aleat );
cout << "Random constructor: " << endl cout << "Random constructor: " << endl
<< c1 << endl; << c1 << endl;
} }
{ {
C c1( 3,4,1 ), c2( c1 ); C c1( 3,4,1 ), c2( c1 );
@ -111,12 +111,12 @@ main()
cout << "Number of Columns: " << endl cout << "Number of Columns: " << endl
<< c1.numOfCols() << endl; << c1.numOfCols() << endl;
} }
{ {
cout << "Class Name: " << endl cout << "Class Name: " << endl
<< c1.className() << endl; << c1.className() << endl;
} }
cout << "-----------------------------------------------------" << endl cout << "-----------------------------------------------------" << endl
<< "Catching exceptions: " << endl << "Catching exceptions: " << endl

View file

@ -1,4 +1,3 @@
#include <iostream> #include <iostream>
#include <eoScalarFitness.h> #include <eoScalarFitness.h>
@ -123,6 +122,3 @@ int main(int argc, char* argv[]) {
cout << "Fitness achieved = " << pop[0].fitness() << endl; cout << "Fitness achieved = " << pop[0].fitness() << endl;
cout << "Function evaluations = " << evals.value() << endl; cout << "Function evaluations = " << evals.value() << endl;
} }

View file

@ -1,4 +1,3 @@
// to avoid long name warnings // to avoid long name warnings
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable:4786) #pragma warning(disable:4786)
@ -113,38 +112,38 @@ int the_main(int argc, char **argv)
if (parser.userNeedsHelp()) if (parser.userNeedsHelp())
{ {
parser.printHelp(std::cout); parser.printHelp(std::cout);
return 0; return 0;
} }
// Either load or initialize // Either load or initialize
if (load_name.value() != "") if (load_name.value() != "")
{ {
state.load(load_name.value()); // load the rest state.load(load_name.value()); // load the rest
} }
else else
{ {
// else // else
// initialize rng and population // initialize rng and population
rng.reseed(seed.value()); rng.reseed(seed.value());
pop.resize(2); pop.resize(2);
pop[0].fitness(1); pop[0].fitness(1);
pop[1].fitness(2); pop[1].fitness(2);
} }
while(checkpoint(pop)) while(checkpoint(pop))
{ {
pop[0].fitness(pop[0].fitness() + 1); pop[0].fitness(pop[0].fitness() + 1);
time_t now = time(0); time_t now = time(0);
while (time(0) == now) {} // wait a second to test timed saver while (time(0) == now) {} // wait a second to test timed saver
std::cout << "gen " << generationCounter.value() << std::endl; std::cout << "gen " << generationCounter.value() << std::endl;
} }
// run the algorithm // run the algorithm
@ -152,9 +151,9 @@ int the_main(int argc, char **argv)
// Save when needed // Save when needed
if (save_name.value() != "") if (save_name.value() != "")
{ {
std::string file_name = save_name.value(); std::string file_name = save_name.value();
save_name.value() = ""; // so that it does not appear in the parser section of the state file save_name.value() = ""; // so that it does not appear in the parser section of the state file
state.save(file_name); state.save(file_name);
} }
return 1; return 1;
@ -164,11 +163,11 @@ int main(int argc, char **argv)
{ {
try try
{ {
the_main(argc, argv); the_main(argc, argv);
} }
catch(std::exception& e) catch(std::exception& e)
{ {
std::cout << "Exception: " << e.what() << std::endl; std::cout << "Exception: " << e.what() << std::endl;
} }
} }

View file

@ -1,4 +1,3 @@
#include <utility> #include <utility>
#include <eo> #include <eo>
@ -13,16 +12,16 @@ class DualSphere : public eoEvalFunc<EOT>
public: public:
virtual void operator()( EOT & x ) virtual void operator()( EOT & x )
{ {
if( x.invalid() ) { return; } if( x.invalid() ) { return; }
double sum = 0; double sum = 0;
int sign = 1; int sign = 1;
for( unsigned int i=0, s=x.size(); i<s; ++i ) { for( unsigned int i=0, s=x.size(); i<s; ++i ) {
sum += x[i] * x[i]; sum += x[i] * x[i];
sign *= x[i]<0 ? -1 : 1; sign *= x[i]<0 ? -1 : 1;
} }
x.fitness( std::make_pair( sum, sign>0 ? true : false ) ); x.fitness( std::make_pair( sum, sign>0 ? true : false ) );
} }
}; };
@ -60,7 +59,7 @@ int main()
pop.push_back( sol4 ); pop.push_back( sol4 );
// on the sphere function everyone has the same fitness of 1 // on the sphere function everyone has the same fitness of 1
if( test(pop, 0) != 0 ) { if( test(pop, 0) != 0 ) {
exit(1); exit(1);
} }
pop.erase(pop.begin(),pop.end()); pop.erase(pop.begin(),pop.end());
@ -75,7 +74,7 @@ int main()
pop.push_back( sol3 ); pop.push_back( sol3 );
pop.push_back( sol4 ); pop.push_back( sol4 );
if( test(pop, 1) != 1 ) { if( test(pop, 1) != 1 ) {
exit(1); exit(1);
} }
// test on a random normal distribution // test on a random normal distribution
@ -84,7 +83,6 @@ int main()
pop = eoPop<DualVector>( 1000000, init_N ); pop = eoPop<DualVector>( 1000000, init_N );
double iqr = test(pop, 1.09); double iqr = test(pop, 1.09);
if( iqr < 1.08 || iqr > 1.11 ) { if( iqr < 1.08 || iqr > 1.11 ) {
exit(1); exit(1);
} }
} }

View file

@ -37,34 +37,34 @@ int main_function(int argc, char *argv[])
eoParser parser(argc, argv); // for user-parameter reading eoParser parser(argc, argv); // for user-parameter reading
eoState state; // keeps all things allocated eoState state; // keeps all things allocated
eoValueParam<bool>& simpleParam = parser.getORcreateParam(true, "Isotropic", eoValueParam<bool>& simpleParam = parser.getORcreateParam(true, "Isotropic",
"Isotropic self-adaptive mutation", "Isotropic self-adaptive mutation",
'i', "ES mutation"); 'i', "ES mutation");
eoValueParam<bool>& stdevsParam = parser.getORcreateParam(false, "Stdev", eoValueParam<bool>& stdevsParam = parser.getORcreateParam(false, "Stdev",
"One self-adaptive stDev per variable", "One self-adaptive stDev per variable",
's', "ES mutation"); 's', "ES mutation");
eoValueParam<bool>& corrParam = parser.getORcreateParam(false, "Correl", eoValueParam<bool>& corrParam = parser.getORcreateParam(false, "Correl",
"Use correlated mutations", "Use correlated mutations",
'c', "ES mutation"); 'c', "ES mutation");
// Run the appropriate algorithm // Run the appropriate algorithm
if (simpleParam.value() == false) if (simpleParam.value() == false)
{ {
std::cout << "Using eoReal" << std::endl; std::cout << "Using eoReal" << std::endl;
runAlgorithm(eoReal<FitT>(), parser, state); runAlgorithm(eoReal<FitT>(), parser, state);
} }
else if (stdevsParam.value() == false) else if (stdevsParam.value() == false)
{ {
std::cout << "Using eoEsSimple" << std::endl; std::cout << "Using eoEsSimple" << std::endl;
runAlgorithm(eoEsSimple<FitT>(), parser, state); runAlgorithm(eoEsSimple<FitT>(), parser, state);
} }
else if (corrParam.value() == false) else if (corrParam.value() == false)
{ {
std::cout << "Using eoEsStdev" << std::endl; std::cout << "Using eoEsStdev" << std::endl;
runAlgorithm(eoEsStdev<FitT>(), parser, state); runAlgorithm(eoEsStdev<FitT>(), parser, state);
} }
else else
{ {
std::cout << "Using eoEsFull" << std::endl; std::cout << "Using eoEsFull" << std::endl;
runAlgorithm(eoEsFull<FitT>(), parser, state); runAlgorithm(eoEsFull<FitT>(), parser, state);
} }
return 0; return 0;
} }
@ -83,11 +83,11 @@ int main(int argc, char **argv)
#endif #endif
try try
{ {
main_function(argc, argv); main_function(argc, argv);
} }
catch(std::exception& e) catch(std::exception& e)
{ {
std::cout << "Exception: " << e.what() << '\n'; std::cout << "Exception: " << e.what() << '\n';
} }
} }

View file

@ -34,7 +34,7 @@ int main_function(int argc, char *argv[])
// Define Parameters and load them // Define Parameters and load them
eoValueParam<uint32_t>& seed = parser.createParam(static_cast<uint32_t>(time(0)), eoValueParam<uint32_t>& seed = parser.createParam(static_cast<uint32_t>(time(0)),
"seed", "Random number seed"); "seed", "Random number seed");
eoValueParam<string>& load_name = parser.createParam(string(), "Load","Load a state file",'L'); eoValueParam<string>& load_name = parser.createParam(string(), "Load","Load a state file",'L');
eoValueParam<string>& save_name = parser.createParam(string(), "Save","Saves a state file",'S'); eoValueParam<string>& save_name = parser.createParam(string(), "Save","Saves a state file",'S');
eoValueParam<bool>& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's'); eoValueParam<bool>& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's');
@ -62,23 +62,23 @@ int main_function(int argc, char *argv[])
// Run the appropriate algorithm // Run the appropriate algorithm
if (stdevs.value() == false && corr.value() == false) if (stdevs.value() == false && corr.value() == false)
{ {
runAlgorithm(eoEsSimple<FitT>() ,parser, state, bounds, load_name); runAlgorithm(eoEsSimple<FitT>() ,parser, state, bounds, load_name);
} }
else if (corr.value() == true) else if (corr.value() == true)
{ {
runAlgorithm(eoEsFull<FitT>(),parser, state, bounds, load_name); runAlgorithm(eoEsFull<FitT>(),parser, state, bounds, load_name);
} }
else else
{ {
runAlgorithm(eoEsStdev<FitT>(), parser, state, bounds, load_name); runAlgorithm(eoEsStdev<FitT>(), parser, state, bounds, load_name);
} }
// and save // and save
if (!save_name.value().empty()) if (!save_name.value().empty())
{ {
string file_name = save_name.value(); string file_name = save_name.value();
save_name.value() = ""; // so that it does not appear in the parser section of the state file save_name.value() = ""; // so that it does not appear in the parser section of the state file
state.save(file_name); state.save(file_name);
} }
return 0; return 0;
@ -98,11 +98,11 @@ int main(int argc, char **argv)
try try
{ {
main_function(argc, argv); main_function(argc, argv);
} }
catch(std::exception& e) catch(std::exception& e)
{ {
std::cout << "Exception: " << e.what() << '\n'; std::cout << "Exception: " << e.what() << '\n';
} }
return 1; return 1;
@ -120,7 +120,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _
if (lambda_rate.value() < 1.0f) if (lambda_rate.value() < 1.0f)
{ {
throw logic_error("lambda_rate must be larger than 1 in a comma strategy"); throw logic_error("lambda_rate must be larger than 1 in a comma strategy");
} }
// Initialization // Initialization
@ -137,8 +137,8 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _
} }
else else
{ {
// evaluate initial population // evaluate initial population
apply<EOT>(eval, pop); apply<EOT>(eval, pop);
} }
// Ok, time to set up the algorithm // Ok, time to set up the algorithm

View file

@ -16,12 +16,12 @@ main()
// a chromosome randomizer // a chromosome randomizer
eoBinRandom<Chrom> random; eoBinRandom<Chrom> random;
// the populations: // the populations:
eoPop<Chrom> pop; eoPop<Chrom> pop;
// Evaluation // Evaluation
eoEvalFuncPtr<Chrom> eval( binary_value ); eoEvalFuncPtr<Chrom> eval( binary_value );
for (i = 0; i < POP_SIZE; ++i) for (i = 0; i < POP_SIZE; ++i)
{ {
Chrom chrom(CHROM_SIZE); Chrom chrom(CHROM_SIZE);
@ -29,12 +29,12 @@ main()
eval(chrom); eval(chrom);
pop.push_back(chrom); pop.push_back(chrom);
} }
std::cout << "population:" << std::endl; std::cout << "population:" << std::endl;
for (i = 0; i < pop.size(); ++i) for (i = 0; i < pop.size(); ++i)
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
// selection // selection
eoLottery<Chrom> lottery; eoLottery<Chrom> lottery;
@ -45,7 +45,7 @@ main()
eoBreeder<Chrom> breeder( propSel ); eoBreeder<Chrom> breeder( propSel );
propSel.addOp(bitflip, 0.25); propSel.addOp(bitflip, 0.25);
propSel.addOp(xover, 0.75); propSel.addOp(xover, 0.75);
// replacement // replacement
eoInclusion<Chrom> inclusion; eoInclusion<Chrom> inclusion;
@ -65,11 +65,10 @@ main()
std::cout << "exception: " << e.what() << std::endl;; std::cout << "exception: " << e.what() << std::endl;;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
std::cout << "pop" << std::endl; std::cout << "pop" << std::endl;
for (i = 0; i < pop.size(); ++i) for (i = 0; i < pop.size(); ++i)
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
return 0; return 0;
} }

View file

@ -19,7 +19,7 @@ double real_value (const Particle & _particle)
{ {
double sum = 0; double sum = 0;
for (unsigned i = 0; i < _particle.size ()-1; i++) for (unsigned i = 0; i < _particle.size ()-1; i++)
sum += pow(_particle[i],2); sum += pow(_particle[i],2);
return (sum); return (sum);
} }
@ -50,15 +50,15 @@ int main()
// perform position initialization // perform position initialization
pop.append (POP_SIZE, random); pop.append (POP_SIZE, random);
// topology // topology
eoLinearTopology<Particle> topology(NEIGHBORHOOD_SIZE); eoLinearTopology<Particle> topology(NEIGHBORHOOD_SIZE);
// the full initializer // the full initializer
eoInitializer <Particle> init(eval,veloRandom,localInit,topology,pop); eoInitializer <Particle> init(eval,veloRandom,localInit,topology,pop);
init(); init();
// bounds // bounds
eoRealVectorBounds bnds(VEC_SIZE,-1.5,1.5); eoRealVectorBounds bnds(VEC_SIZE,-1.5,1.5);
@ -71,33 +71,32 @@ int main()
// Terminators // Terminators
eoGenContinue <Particle> genCont1 (50); eoGenContinue <Particle> genCont1 (50);
eoGenContinue <Particle> genCont2 (50); eoGenContinue <Particle> genCont2 (50);
// PS flight // PS flight
eoEasyPSO<Particle> pso1(genCont1, eval, velocity, flight); eoEasyPSO<Particle> pso1(genCont1, eval, velocity, flight);
eoEasyPSO<Particle> pso2(init,genCont2, eval, velocity, flight); eoEasyPSO<Particle> pso2(init,genCont2, eval, velocity, flight);
// flight // flight
try try
{ {
pso1(pop); pso1(pop);
std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl; std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl;
for (i = 0; i < pop.size(); ++i) for (i = 0; i < pop.size(); ++i)
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
pso2(pop); pso2(pop);
std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl; std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl;
for (i = 0; i < pop.size(); ++i) for (i = 0; i < pop.size(); ++i)
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
} }
catch (std::exception& e) catch (std::exception& e)
{ {
std::cout << "exception: " << e.what() << std::endl;; std::cout << "exception: " << e.what() << std::endl;;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
return 0; return 0;
} }

View file

@ -66,11 +66,11 @@ int main(int argc, char **argv)
{ {
try try
{ {
main_function(argc, argv); main_function(argc, argv);
} }
catch(std::exception& e) catch(std::exception& e)
{ {
std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl; std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl;
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

View file

@ -4,7 +4,7 @@
#endif #endif
#include <iostream> #include <iostream>
#include <stdexcept> // runtime_error #include <stdexcept> // runtime_error
#include <eoEvalFuncPtr.h> #include <eoEvalFuncPtr.h>
#include <other/external_eo> #include <other/external_eo>
@ -61,9 +61,9 @@ bool UserDefMutate(UserDefStruct& a)
a = RandomStruct(); // just for testing a = RandomStruct(); // just for testing
if (rng.flip(0.1f)) if (rng.flip(0.1f))
a.d = UserDefStruct::test; a.d = UserDefStruct::test;
else else
a.d = UserDefStruct::another; a.d = UserDefStruct::another;
return true; return true;
} }
@ -72,13 +72,13 @@ bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b)
std::cout << "UserDefBinCrossover\n"; std::cout << "UserDefBinCrossover\n";
if (rng.flip(0.5)) if (rng.flip(0.5))
a.a = b.a; a.a = b.a;
if (rng.flip(0.5)) if (rng.flip(0.5))
a.b = b.b; a.b = b.b;
if (rng.flip(0.5)) if (rng.flip(0.5))
a.c = b.c; a.c = b.c;
if (rng.flip(0.5)) if (rng.flip(0.5))
a.d = b.d; a.d = b.d;
return true; return true;
} }
@ -86,13 +86,13 @@ bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b)
{ {
std::cout << "UserDefQuadCrossover\n"; std::cout << "UserDefQuadCrossover\n";
if (rng.flip(0.5)) if (rng.flip(0.5))
swap(a.a, b.a); swap(a.a, b.a);
if (rng.flip(0.5)) if (rng.flip(0.5))
swap(a.b, b.b); swap(a.b, b.b);
if (rng.flip(0.5)) if (rng.flip(0.5))
swap(a.c, b.c); swap(a.c, b.c);
if (rng.flip(0.5)) if (rng.flip(0.5))
swap(a.d, b.d); swap(a.d, b.d);
return true; return true;
} }

View file

@ -1,5 +1,5 @@
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// t-eoFitnessAssembled.cpp // t-eoFitnessAssembled.cpp
// Marc Wintermantel & Oliver Koenig // Marc Wintermantel & Oliver Koenig
@ -11,19 +11,19 @@
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
Marc.Schoenauer@inria.fr Marc.Schoenauer@inria.fr
mak@dhi.dk mak@dhi.dk
*/ */
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include <iostream> #include <iostream>
@ -32,7 +32,7 @@
#include "eoScalarFitnessAssembled.h" #include "eoScalarFitnessAssembled.h"
void test_eoScalarFitnessAssembledClass(){ void test_eoScalarFitnessAssembledClass(){
// Create instances // Create instances
eoAssembledMinimizingFitness A,B,C(5, 1.3, "C value"); eoAssembledMinimizingFitness A,B,C(5, 1.3, "C value");
@ -53,9 +53,9 @@ void test_eoScalarFitnessAssembledClass(){
std::cout << "C= " << C << std::endl; std::cout << "C= " << C << std::endl;
std::cout << "Printing values and descriptions: " << std::endl; std::cout << "Printing values and descriptions: " << std::endl;
std::cout << "A: "; A.printAll( std::cout ); std::cout << std::endl; std::cout << "A: "; A.printAll( std::cout ); std::cout << std::endl;
std::cout << "B: "; B.printAll( std::cout ); std::cout << std::endl; std::cout << "B: "; B.printAll( std::cout ); std::cout << std::endl;
std::cout << "C: "; C.printAll( std::cout ); std::cout << std::endl; std::cout << "C: "; C.printAll( std::cout ); std::cout << std::endl;
A.resize(8, 100.3, "A resized"); A.resize(8, 100.3, "A resized");
std::cout << "Resized A: "; A.printAll( std::cout ); std::cout << std::endl; std::cout << "Resized A: "; A.printAll( std::cout ); std::cout << std::endl;
@ -68,7 +68,7 @@ void test_eoScalarFitnessAssembledClass(){
F=A; F=A;
G= 7.5; G= 7.5;
std::cout << "F = A : " << F << "\t G = 7.5 : " << G << std::endl; std::cout << "F = A : " << F << "\t G = 7.5 : " << G << std::endl;
// Comparing... // Comparing...
std::cout << "A<B: " << (A<B) << std::endl; std::cout << "A<B: " << (A<B) << std::endl;
std::cout << "A>B: " << (A>B) << std::endl; std::cout << "A>B: " << (A>B) << std::endl;
@ -80,15 +80,15 @@ void test_eoScalarFitnessAssembledClass(){
int main(){ int main(){
std::cout << "-----------------------------------" << std::endl; std::cout << "-----------------------------------" << std::endl;
std::cout << "START t-eoFitnessAssembled" << std::endl; std::cout << "START t-eoFitnessAssembled" << std::endl;
try{ try{
// Test the fitness class itself // Test the fitness class itself
test_eoScalarFitnessAssembledClass(); test_eoScalarFitnessAssembledClass();
} }
catch(std::exception& e){ catch(std::exception& e){
@ -102,4 +102,3 @@ int main(){
return 0; return 0;
} }

View file

@ -1,5 +1,5 @@
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// t-eoFitnessAssembledEA.cpp // t-eoFitnessAssembledEA.cpp
// Marc Wintermantel & Oliver Koenig // Marc Wintermantel & Oliver Koenig
@ -11,19 +11,19 @@
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: todos@geneura.ugr.es, http://geneura.ugr.es
Marc.Schoenauer@inria.fr Marc.Schoenauer@inria.fr
mak@dhi.dk mak@dhi.dk
*/ */
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
@ -41,7 +41,7 @@
#include <es/eoReal.h> // Definition of representation #include <es/eoReal.h> // Definition of representation
#include <es/eoRealInitBounded.h> // Uniformly initializes real vector in bounds #include <es/eoRealInitBounded.h> // Uniformly initializes real vector in bounds
#include <es/make_genotype_real.h> // Initialization of a genotype #include <es/make_genotype_real.h> // Initialization of a genotype
#include <eoEvalFunc.h> // Base class for fitness evaluation #include <eoEvalFunc.h> // Base class for fitness evaluation
#include <es/make_op_real.h> // Variation operators using standard Real operators #include <es/make_op_real.h> // Variation operators using standard Real operators
#include <eoScalarFitnessAssembled.h> // The fitness class #include <eoScalarFitnessAssembled.h> // The fitness class
typedef eoReal<eoAssembledMinimizingFitness> Indi; typedef eoReal<eoAssembledMinimizingFitness> Indi;
@ -51,7 +51,7 @@ typedef eoReal<eoAssembledMinimizingFitness> Indi;
#include <do/make_continue.h> // The stopping criterion #include <do/make_continue.h> // The stopping criterion
#include <do/make_checkpoint_assembled.h> // Outputs (stats, population dumps, ...) #include <do/make_checkpoint_assembled.h> // Outputs (stats, population dumps, ...)
#include <do/make_algo_scalar.h> // Evolution engine (selection and replacement) #include <do/make_algo_scalar.h> // Evolution engine (selection and replacement)
#include <do/make_run.h> // simple call to the algo.stays there for consistency reasons #include <do/make_run.h> // simple call to the algo.stays there for consistency reasons
// Define a fitness class // Define a fitness class
template <class EOT> template <class EOT>
@ -59,9 +59,9 @@ class eoAssembledEvalFunc : public eoEvalFunc<EOT>{
public: public:
// Constructor defining number and descriptions of fitness terms // Constructor defining number and descriptions of fitness terms
eoAssembledEvalFunc() { eoAssembledEvalFunc() {
// Define a temporary fitness object to have access to its static traits // Define a temporary fitness object to have access to its static traits
typename EOT::Fitness tmpfit(3, 0.0); typename EOT::Fitness tmpfit(3, 0.0);
tmpfit.setDescription(0,"Fitness"); tmpfit.setDescription(0,"Fitness");
tmpfit.setDescription(1,"Some Value"); tmpfit.setDescription(1,"Some Value");
tmpfit.setDescription(2,"Other Value"); tmpfit.setDescription(2,"Other Value");
@ -70,27 +70,27 @@ public:
void operator()(EOT& _eo){ void operator()(EOT& _eo){
// Define temporary fitness object // Define temporary fitness object
// (automatically gets initialized with size given in constructor) // (automatically gets initialized with size given in constructor)
typename EOT::Fitness tmpfit; typename EOT::Fitness tmpfit;
// Eval some dummy fitness // Eval some dummy fitness
double sum1=0.0, sum2=0.0; double sum1=0.0, sum2=0.0;
for (unsigned i=0; i < _eo.size(); ++i){ for (unsigned i=0; i < _eo.size(); ++i){
sum1 += _eo[i]*_eo[i]; sum1 += _eo[i]*_eo[i];
sum2 += fabs(_eo[i]) + fabs(_eo[i]); sum2 += fabs(_eo[i]) + fabs(_eo[i]);
} }
// Store some fitness terms // Store some fitness terms
tmpfit[1]= sum1; tmpfit[1]= sum1;
tmpfit[2]= sum2; tmpfit[2]= sum2;
// Store the fitness // Store the fitness
tmpfit = (sum1 + sum2)/_eo.size(); tmpfit = (sum1 + sum2)/_eo.size();
// Pass it // Pass it
_eo.fitness( tmpfit ); _eo.fitness( tmpfit );
} }
}; };
@ -99,14 +99,14 @@ void make_help(eoParser & _parser);
// now use all of the above, + representation dependent things // now use all of the above, + representation dependent things
int main(int argc, char* argv[]){ int main(int argc, char* argv[]){
std::cout << "-----------------------------------" << std::endl; std::cout << "-----------------------------------" << std::endl;
std::cout << "START t-eoFitnessAssembledEA" << std::endl; std::cout << "START t-eoFitnessAssembledEA" << std::endl;
try{ try{
// Parser & State // Parser & State
eoParser parser(argc, argv); // for user-parameter reading eoParser parser(argc, argv); // for user-parameter reading
eoState state; // keeps all things allocated eoState state; // keeps all things allocated
//// ////
@ -120,7 +120,7 @@ int main(int argc, char* argv[]){
// The genotype // The genotype
eoRealInitBounded<Indi>& init = do_make_genotype(parser, state, Indi() ); eoRealInitBounded<Indi>& init = do_make_genotype(parser, state, Indi() );
// The variation operators // The variation operators
eoGenOp<Indi>& op = do_make_op(parser, state, init); eoGenOp<Indi>& op = do_make_op(parser, state, init);
@ -158,7 +158,7 @@ int main(int argc, char* argv[]){
std::cout << "Final Population\n"; std::cout << "Final Population\n";
pop.sortedPrintOn(std::cout); pop.sortedPrintOn(std::cout);
std::cout << std::endl; std::cout << std::endl;
} }
catch(std::exception& e) catch(std::exception& e)
{ {

Some files were not shown because too many files have changed in this diff Show more