adding eoInsertion

This commit is contained in:
gustavo 1999-02-05 18:25:28 +00:00
commit 46e19b13c3
6 changed files with 77 additions and 10 deletions

View file

@ -8,7 +8,6 @@
#ifndef _EOPOPOPS_H
#define _EOPOPOPS_H
using namespace std;
/**
@ -99,13 +98,13 @@ class eoMerge: public eoObject{
* @param breeders Tranformed individuals.
* @param pop The original population at the begining, the result at the end
*/
virtual operator () ( const eoPop<EOT>& breeders, eoPop<EOT>& pop ) = 0;
virtual void operator () ( const eoPop<EOT>& breeders, eoPop<EOT>& pop ) = 0;
/** @name Methods from eoObject */
/** @name Methods from eoObject */
//@{
/** readFrom and printOn are not overriden
/** readFrom and printOn are not overriden
*/
/** Inherited from eoObject. Returns the class name.
/** Inherited from eoObject. Returns the class name.
@see eoObject
*/
string className() const {return "eoMerge";};
@ -113,6 +112,10 @@ class eoMerge: public eoObject{
/// Return the rate to be selected from the original population
float rate() const { return rep_rate; }
/// Set the rate to be obtained after replacement.
/// @param _rate The rate.
void rate(const float& _rate) { rep_rate = _rate; }
private:
float rep_rate;