- the last modifications of the eopopulator class - the include files (were totally missing in the old templates) - JJ's demand for one class - one file :-)
42 lines
744 B
Cheetah
42 lines
744 B
Cheetah
/*
|
|
Template for simple mutation operators
|
|
======================================
|
|
*/
|
|
|
|
#ifndef eoMyDerivedMonOp_H
|
|
#define eoMyDerivedMonOp_H
|
|
|
|
|
|
#include <eoOp.h>
|
|
|
|
template<class Indi>
|
|
class eoMyDerivedMonOp: public eoMonOp<Indi>
|
|
{
|
|
public:
|
|
/**
|
|
* (Default) Constructor.
|
|
*/
|
|
eoMyDerivedMonOp(paramType _anyParameter) :
|
|
anyParameter(_anyParameter) {}
|
|
|
|
/// The class name. Used to display statistics
|
|
string className() const { return "eoMyDerivedMonOp"; }
|
|
|
|
/**
|
|
* modifies the parent
|
|
* @param Indi The parent
|
|
*/
|
|
bool operator()(Indi& Indi)
|
|
{
|
|
// do whatever needs to be done
|
|
// if Indi has been modified
|
|
return true;
|
|
// otherwise
|
|
// return false;
|
|
}
|
|
|
|
protected:
|
|
paramType anyParameter
|
|
};
|
|
|
|
#endif
|