*** empty log message ***

This commit is contained in:
kuepper 2005-10-03 12:54:45 +00:00
commit 4bfc3afe9b
4 changed files with 27 additions and 60 deletions

View file

@ -1,7 +1,7 @@
* release 0.9.4 * release 0.9.4
- Update introductory pages of documentation and webpage. - Update introductory pages of documentation and webpage.
- 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.
* releases 0.9.3... (latest release is 0.9.3zz, 1. Oct. 2005) * releases 0.9.3... (latest release is 0.9.3zz, 1. Oct. 2005)

View file

@ -27,6 +27,12 @@
#ifndef eoSequential_h #ifndef eoSequential_h
#define eoSequential_h #define eoSequential_h
#include <limits>
#include "utils/eoData.h"
#include "utils/eoRNG.h"
#include "eoSelectOne.h"
/** Contains the following classes: /** Contains the following classes:
* - eoSequentialSelect, returns all individuals one by one, * - eoSequentialSelect, returns all individuals one by one,
* either sorted or shuffled * either sorted or shuffled
@ -34,33 +40,23 @@
* starting with best, continuing shuffled (see G3 engine) * starting with best, continuing shuffled (see G3 engine)
*/ */
#include <utils/eoData.h>
#include <utils/eoRNG.h>
#include <eoSelectOne.h>
//----------------------------------------------------------------------------- /** All Individuals in order
/** eoSequentialSelect: returns all individual in order
* looping back to the beginning when exhasuted Looping back to the beginning when exhausted, can be from best to
* can be from best to worse, or in random order worse, or in random order.
*
* It is the eoSelectOne equivalent of eoDetSelect - It is the eoSelectOne equivalent of eoDetSelect - though eoDetSelect
* though eoDetSelect always returns individuals from best to worst always returns individuals from best to worst
*/ */
//-----------------------------------------------------------------------------
template <class EOT> class eoSequentialSelect: public eoSelectOne<EOT> template <class EOT> class eoSequentialSelect: public eoSelectOne<EOT>
{ {
public: public:
/** Ctor: sets the current pter to MAXINT so init will take place first time /** Ctor: sets the current pter to numeric_limits<unsigned>::max() so init will take place first time
not very elegant, maybe ... not very elegant, maybe ...
*/ */
#ifdef _MSC_VER
eoSequentialSelect(bool _ordered = true) eoSequentialSelect(bool _ordered = true)
: ordered(_ordered), current(std::MAXINT) {} : ordered(_ordered), current(std::numeric_limits<unsigned>::max()) {}
#else
eoSequentialSelect(bool _ordered = true)
: ordered(_ordered), current(MAXINT) {}
#endif
void setup(const eoPop<EOT>& _pop) void setup(const eoPop<EOT>& _pop)
{ {
@ -88,28 +84,24 @@ private:
}; };
//-----------------------------------------------------------------------------
/** eoEliteSequentialSelect: returns the best individual first,
* then the others in sequence (random order).
* for G3 evolution engine, see Deb, Anad and Joshi, CEC 2002
*
* As eoSequentialSelect, it is an eoSelectOne to be used within the eoEaseyEA
* algo, but conceptually it should be a global eoSelect, as
* it selects a bunch of guys in one go (done in the setup function now)
*/
/** All Individuals in order
The best individual first, then the others in sequence (random order).
for G3 evolution engine, see Deb, Anad and Joshi, CEC 2002
As eoSequentialSelect, it is an eoSelectOne to be used within the
eoEaseyEA algo, but conceptually it should be a global eoSelect, as it
selects a bunch of guys in one go (done in the setup function now)
*/
template <class EOT> class eoEliteSequentialSelect: public eoSelectOne<EOT> template <class EOT> class eoEliteSequentialSelect: public eoSelectOne<EOT>
{ {
public: public:
/** Ctor: sets the current pter to MAXINT so init will take place first time /** Ctor: sets the current pter to numeric_limits<unsigned>::max() so init will take place first time
not very elegant, maybe ... not very elegant, maybe ...
*/ */
#ifdef _MSC_VER eoEliteSequentialSelect(): current(std::numeric_limits<unsigned>::max()) {}
eoEliteSequentialSelect(): current(std::MAXINT) {}
#else
eoEliteSequentialSelect(): current(MAXINT) {}
#endif
void setup(const eoPop<EOT>& _pop) void setup(const eoPop<EOT>& _pop)
{ {
@ -150,4 +142,3 @@ private:
#endif #endif

View file

@ -1,27 +1,8 @@
// Copyright (C) 2005 Jochen Küpper <jochen@fhi-berlin.mpg.de> // Copyright (C) 2005 Jochen Küpper <jochen@fhi-berlin.mpg.de>
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; see the file License. if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#include "eoData.h" #include "eoData.h"
#ifdef HAVE_NUMERIC_LIMITS
int MAXINT = numeric_limits<int>::max();
#else
#include <limits.h>
int MAXINT = INT_MAX;
#endif
// Local Variables: // Local Variables:

View file

@ -25,11 +25,6 @@
#ifndef EODATA_H #ifndef EODATA_H
#define EODATA_H #define EODATA_H
#ifdef MAXINT
#undef MAXINT
#endif
extern int MAXINT;
#ifndef _MSC_VER #ifndef _MSC_VER
#include <math.h> #include <math.h>
#define _isnan isnan #define _isnan isnan