#include <RouletteWheel.h>
Inheritance diagram for genetiK::RouletteWheel:
Public Member Functions | |
RouletteWheel (void) | |
default constructor | |
virtual | ~RouletteWheel (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 "Roulette Wheel" policy to select individuals from a population.
Roulette Wheel selection is defined as follows: each Individual i in the Population can be selected with probability
where is the fitness of i
|
retrieves the Individual having highest fitness in the Population
Implements genetiK::SelectionMethod. |
|
initializes the RouletteWheel selection method with a specific Population When initializing, the Cumulative Distribution Function (CDF) associated to the probability distribution defined by the previously mentioned is calculated.
Reimplemented from genetiK::SelectionMethod. |
|
selects an Individual from the current Population An Individual i will be selected with probability
Implements genetiK::SelectionMethod. |