#include <SelectionMethod.h>
Inheritance diagram for genetiK::SelectionMethod:
Public Member Functions | |
SelectionMethod (void) | |
default constructor | |
virtual | ~SelectionMethod (void) |
default destructor | |
virtual void | init (Population *population) |
initializes the SelectionMethod with a specific Population | |
virtual Individual * | select ()=0 |
selects an Individual from the current Population | |
virtual Individual * | getBest ()=0 |
retrieves the Individual having highest fitness in the Population |
This abstract class encapsulates a policy to select individuals from a population. It should be extended to implement specific selection methods.
|
retrieves the Individual having highest fitness in the Population
Implemented in genetiK::RankingSelection, genetiK::RouletteWheel, and genetiK::TournamentSelection. |
|
initializes the SelectionMethod with a specific Population
Reimplemented in genetiK::RankingSelection, genetiK::RouletteWheel, and genetiK::TournamentSelection. |
|
selects an Individual from the current Population Subclasses override this method to implement a specific selection policy
Implemented in genetiK::RankingSelection, genetiK::RouletteWheel, and genetiK::TournamentSelection. |