Modified crossover and mutation to account for the new interface (bool ...)
Added the genop.tmpl, template for general op, 3 cases, growing pop, shrinking pop through erase, thrinking pop through extra selector
This commit is contained in:
parent
83e883a158
commit
1662fd2a8b
3 changed files with 186 additions and 11 deletions
|
|
@ -21,12 +21,13 @@ public:
|
|||
* eoMon crossover - modifies the parent
|
||||
* @param Indi The parent
|
||||
*/
|
||||
void operator()(Indi& Indi)
|
||||
bool operator()(Indi& Indi)
|
||||
{
|
||||
// do whatever needs to be done
|
||||
|
||||
// DON'T FORGET if an individual is modified, to invalidate its fitness!!!
|
||||
Indi.invalidate();
|
||||
// if Indi has been modified
|
||||
return true;
|
||||
// otherwise
|
||||
// return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue