From 06dd2dc314f462b97224576cbcb7f09b90b632a9 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 21 Mar 2001 12:10:13 +0000 Subject: [PATCH] Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes --- eo/src/{obsolete => }/eoAtomMutation.h | 15 +++++++++------ eo/src/{obsolete => }/eoAtomMutator.h | 3 ++- eo/src/eoFunctor.h | 1 + eo/src/eoOp.h | 2 +- eo/src/eoSTLFunctor.h | 2 +- eo/src/eoVector.h | 11 ++++++++--- 6 files changed, 22 insertions(+), 12 deletions(-) rename eo/src/{obsolete => }/eoAtomMutation.h (84%) rename eo/src/{obsolete => }/eoAtomMutator.h (87%) diff --git a/eo/src/obsolete/eoAtomMutation.h b/eo/src/eoAtomMutation.h similarity index 84% rename from eo/src/obsolete/eoAtomMutation.h rename to eo/src/eoAtomMutation.h index 59266e3f..dae8ff61 100644 --- a/eo/src/obsolete/eoAtomMutation.h +++ b/eo/src/eoAtomMutation.h @@ -19,7 +19,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es - */ + + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Attic/eoAtomMutation.h,v 1.7 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ +*/ //----------------------------------------------------------------------------- #ifndef _EOATOMMUTATION_H #define _EOATOMMUTATION_H @@ -41,25 +43,26 @@ class eoAtomMutation: public eoMonOp { public: #ifdef _MSC_VER - typedef EOT::Type Type; + typedef EOT::AtomType Type; #else - typedef typename EOT::Type Type; + typedef typename EOT::AtomType Type; #endif /// - eoAtomMutation(const eoAtomMutator& _atomMut, const double _rate=0.0) + eoAtomMutation(eoAtomMutator& _atomMut, const double _rate=0.0) : eoMonOp< EOT >(), rate(_rate), atomMutator( _atomMut ) {}; /// virtual ~eoAtomMutation() {}; /// - virtual void operator()( EOT& _eo ) const { + virtual bool operator()( EOT& _eo ) { typename EOT::iterator i; for ( i = _eo.begin(); i != _eo.end(); i ++ ) if ( rng.flip( rate ) ) { atomMutator( *i ); } + return true; } /** To print me on a stream. @@ -87,7 +90,7 @@ public: private: double rate; - const eoAtomMutator& atomMutator; + eoAtomMutator& atomMutator; }; diff --git a/eo/src/obsolete/eoAtomMutator.h b/eo/src/eoAtomMutator.h similarity index 87% rename from eo/src/obsolete/eoAtomMutator.h rename to eo/src/eoAtomMutator.h index ff4eedf4..a143a55a 100644 --- a/eo/src/obsolete/eoAtomMutator.h +++ b/eo/src/eoAtomMutator.h @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Attic/eoAtomMutator.h,v 1.4 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- #ifndef _EOATOMMUTATOR_H @@ -33,7 +34,7 @@ */ template -class eoAtomMutator: public eoUnaryFunctor {}; +class eoAtomMutator: public eoUF {}; #endif diff --git a/eo/src/eoFunctor.h b/eo/src/eoFunctor.h index 01d96db7..ebce1279 100644 --- a/eo/src/eoFunctor.h +++ b/eo/src/eoFunctor.h @@ -20,6 +20,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es mak@dhi.dk + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.5 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 607962f3..e1986759 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.27 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ */ //----------------------------------------------------------------------------- @@ -63,7 +64,6 @@ how to build them from a description in a file. */ template - class eoOp { public: diff --git a/eo/src/eoSTLFunctor.h b/eo/src/eoSTLFunctor.h index 682b4294..74c20603 100644 --- a/eo/src/eoSTLFunctor.h +++ b/eo/src/eoSTLFunctor.h @@ -115,4 +115,4 @@ class eoSTLBF : public std::binary_function // TODO: put automated wrappers here... -#endif \ No newline at end of file +#endif diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index d4e89e5b..2be9e8e0 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -20,7 +20,10 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr - mak@dhi.dk + mak@dhi.dk + + CVS Info: $Date: 2001-03-21 12:10:13 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoVector.h,v 1.9 2001-03-21 12:10:13 jmerelo Exp $ $Author: jmerelo $ + */ //----------------------------------------------------------------------------- @@ -32,9 +35,11 @@ /** Base class for fixed length chromosomes, just derives from EO and vector and - redirects the smaller than operator to EO (fitness based comparison) + redirects the smaller than operator to EO (fitness based comparison). GeneType + must have the following methods: void ctor (needed for the vector<>), copy ctor, + + */ - template class eoVector : public EO, public std::vector {