#include <selection.h>
Public Methods | |
SelectionMatrix (const SelectionSituation &situation) | |
void | selectRandomPair (int &a, int &b) const |
TextOStream & | operator>> (TextOStream &out) const |
Protected Methods | |
void | calculateMatrix (const SelectionSituation &situation) |
Yes, the selection mechanism acts on parent PAIRS; it doesn't just select one parent and then another parent and then mate them. This mechanism allows individuals themselves to affect their selection. It is also easy to incorporate various other factors such as distance in some environment-space as a selection probability factor between two individuals.
Definition at line 36 of file selection.h.
|
Standard constructor. * * Copyright (C) 1997-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
Definition at line 33 of file selection.cc. References calculateMatrix(). |
|
Calculates the selection matrix.
Definition at line 37 of file selection.cc. References SelectionSituation::getOrdered(), SelectionSituation::population(), Selector::select(), Individual::selector(), and SimplePopulation::size(). Referenced by SelectionMatrix(). |
|
Implementation for Object.
Definition at line 54 of file selection.h. |
|
Selects a random pair of individuals from the population. These individuals will be mated.
Definition at line 70 of file selection.cc. Referenced by EAStrategy::recombine(). |