#include <TournamentSelection.h>
Inheritance diagram for genetiK::TournamentSelection:
Public Member Functions | |
TournamentSelection (unsigned int size) | |
sets size as the Tournament size | |
virtual | ~TournamentSelection (void) |
default destructor | |
void | init (Population *population) |
initializes the RouletteWheel selection method with a specific Population | |
Individual * | select () |
selects an Individual from the current Population | |
Individual * | getBest () |
retrieves the Individual having highest fitness in the Population |
This class encapsulates the "Tournament" policy to select individuals from a population.
Tournament selection chooses size individuals from the population, with uniform probability, and then selects the best among them.
|
sets size as the Tournament size
|
|
retrieves the Individual having highest fitness in the Population
Implements genetiK::SelectionMethod. |
|
initializes the RouletteWheel selection method with a specific Population
Reimplemented from genetiK::SelectionMethod. |
|
selects an Individual from the current Population Chooses size individuals from the Populations and selects the best among them.
Implements genetiK::SelectionMethod. |