This commit is contained in:
kuepper 2005-10-10 21:13:27 +00:00
commit e9324fdb07
2 changed files with 75 additions and 65 deletions

View file

@ -1,28 +1,24 @@
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- /* (c) GeNeura Team, 2000 - EEAAX 1999, Maarten Keijzer 2000
//----------------------------------------------------------------------------- This library is free software; you can redistribute it and/or modify it under
// eoEsSimple.h the terms of the GNU Lesser General Public License as published by the Free
// (c) GeNeura Team, 2000 - EEAAX 1999, Maarten Keijzer 2000 Software Foundation; either version 2 of the License, or (at your option) any
/* later version.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
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
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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
License along with this library; if not, write to the Free Software with this library; if not, write to the Free Software Foundation, Inc., 59
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: http://eodev.sourceforge.net
Marc.Schoenauer@polytechnique.fr todos@geneura.ugr.es, http://geneura.ugr.es
mak@dhi.dk Marc.Schoenauer@polytechnique.fr
mak@dhi.dk
*/ */
//-----------------------------------------------------------------------------
#ifndef _eoEsSimple_h #ifndef _eoEsSimple_h
#define _eoEsSimple_h #define _eoEsSimple_h
@ -32,17 +28,16 @@
#include <eoVector.h> #include <eoVector.h>
/** /** Simple Evolution Strategy
\ingroup EvolutionStrategies
One of the more simple evolution strategies, sporting just a single @ingroup EvolutionStrategies
stdeviation for the entire chromosome. For more advanced versions
see also eoEsStdev eoEsFull
@see eoEsStdev eoEsFull One of the more simple evolution strategies, sporting just a single stdeviation
for the entire chromosome. For more advanced versions see also eoEsStdev
eoEsFull
@see eoEsStdev eoEsFull
*/ */
template <class Fit> template <class Fit>
class eoEsSimple : public eoVector<Fit, double> class eoEsSimple : public eoVector<Fit, double>
{ {
@ -50,21 +45,19 @@ public :
typedef double Type; typedef double Type;
eoEsSimple(void) : eoVector<Fit, double>() {} eoEsSimple() : eoVector<Fit, double>() {}
virtual std::string className(void) const { return "eoEsSimple"; } virtual std::string className() const { return "eoEsSimple"; }
void printOn(std::ostream& os) const void printOn(std::ostream& os) const
{ {
eoVector<Fit,double>::printOn(os); eoVector<Fit,double>::printOn(os);
os << ' ' << stdev << ' '; os << ' ' << stdev << ' ';
} }
void readFrom(std::istream& is) void readFrom(std::istream& is)
{ {
eoVector<Fit,double>::readFrom(is); eoVector<Fit,double>::readFrom(is);
is >> stdev; is >> stdev;
} }
@ -72,3 +65,13 @@ public :
}; };
#endif #endif
// Local Variables:
// coding: iso-8859-1
// mode:C++
// c-file-style: "Stroustrup"
// comment-column: 35
// fill-column: 80
// End:

View file

@ -1,47 +1,44 @@
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- /* (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000
//----------------------------------------------------------------------------- This library is free software; you can redistribute it and/or modify it under
// eoEsStdev.h the terms of the GNU Lesser General Public License as published by the Free
// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 Software Foundation; either version 2 of the License, or (at your option) any
/* later version.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
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
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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
License along with this library; if not, write to the Free Software with this library; if not, write to the Free Software Foundation, Inc., 59
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: http://eodev.sourceforge.net
Marc.Schoenauer@polytechnique.fr todos@geneura.ugr.es, http://geneura.ugr.es
mak@dhi.dk Marc.Schoenauer@polytechnique.fr
mak@dhi.dk
*/ */
//-----------------------------------------------------------------------------
#ifndef _eoEsStdev_h #ifndef _eoEsStdev_h
#define _eoEsStdev_h #define _eoEsStdev_h
#include <eoVector.h> #include <eoVector.h>
/**
\ingroup EvolutionStrategies
Evolutionary strategie style representation, supporting co-evolving standard /** Evolutionary Strategy with a standard deviation per parameter
deviations.
@ingroup EvolutionStrategies
Evolutionary strategie style representation, supporting co-evolving
standard deviations.
*/ */
template <class Fit> template <class Fit>
class eoEsStdev : public eoVector<Fit, double> class eoEsStdev : public eoVector<Fit, double>
{ {
public: public:
using eoEsStdev< Fit >::size; using eoEsStdev<Fit>::size;
typedef double Type; typedef double Type;
@ -71,3 +68,13 @@ public:
}; };
#endif #endif
// Local Variables:
// coding: iso-8859-1
// mode:C++
// c-file-style: "Stroustrup"
// comment-column: 35
// fill-column: 80
// End: