Survival and mating selection to find the next parent set. More...
#include <shark/Algorithms/DirectSearch/Operators/Selection/EPTournamentSelection.h>
Public Member Functions | |
template<typename InIterator , typename OutIterator > | |
void | operator() (rng_type &rng, InIterator it, InIterator itE, OutIterator out, OutIterator outE) |
Selects individuals from the range of individuals. More... | |
template<typename Population > | |
void | operator() (rng_type &rng, Population &population, std::size_t mu) |
Selects individuals from the range of individuals. More... | |
Public Attributes | |
std::size_t | tournamentSize |
Size of the tournament. 4 by default. More... | |
Survival and mating selection to find the next parent set.
For a given Tournament size k, every individual is compared to k other individuals The ranking of the individuals is given by the template argument. The individuals which won the most tournaments are selected
Definition at line 45 of file EPTournamentSelection.h.
|
inline |
Selects individuals from the range of individuals.
[in] | it | Iterator pointing to the first valid parent individual. |
[in] | itE | Iterator pointing to the first invalid parent individual. |
[in] | out | Iterator pointing to the first valid element of the output range. |
[in] | outE | Iterator pointing to the first invalid element of the output range. |
Definition at line 54 of file EPTournamentSelection.h.
|
inline |
Selects individuals from the range of individuals.
Instead of using an output range, surviving individuals are marked as selected.
[in] | population | The population where individuals are selected from |
[in] | mu | number of individuals to select |
Definition at line 75 of file EPTournamentSelection.h.
std::size_t shark::EPTournamentSelection< Ordering >::tournamentSize |
Size of the tournament. 4 by default.
Definition at line 93 of file EPTournamentSelection.h.