Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes
This commit is contained in:
parent
6f6ce7d81a
commit
06dd2dc314
6 changed files with 22 additions and 12 deletions
|
|
@ -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<EOT> {
|
|||
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<Type>& _atomMut, const double _rate=0.0)
|
||||
eoAtomMutation(eoAtomMutator<Type>& _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<Type>& atomMutator;
|
||||
eoAtomMutator<Type>& atomMutator;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -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 T>
|
||||
class eoAtomMutator: public eoUnaryFunctor<void, T&> {};
|
||||
class eoAtomMutator: public eoUF<T&, bool> {};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -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 $
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -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 EOType>
|
||||
|
||||
class eoOp
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -115,4 +115,4 @@ class eoSTLBF : public std::binary_function<A1, A2, R>
|
|||
|
||||
// TODO: put automated wrappers here...
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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 FitT, class GeneType>
|
||||
class eoVector : public EO<FitT>, public std::vector<GeneType>
|
||||
{
|
||||
|
|
|
|||
Reference in a new issue