shark::RouletteWheelSelection Struct Reference

Fitness-proportional selection operator. More...

#include <shark/Algorithms/DirectSearch/Operators/Selection/RouletteWheelSelection.h>

Public Member Functions

template<typename Rng , typename Iterator >
Iterator operator() (Rng &rng, Iterator it, Iterator itE, RealVector const &probabilities) const
 Selects an individual from the range of individuals with prob. proportional to its fitness. More...
 

Detailed Description

Fitness-proportional selection operator.

See http://en.wikipedia.org/wiki/Fitness_proportionate_selection.

Definition at line 48 of file RouletteWheelSelection.h.

Member Function Documentation

◆ operator()()

template<typename Rng , typename Iterator >
Iterator shark::RouletteWheelSelection::operator() ( Rng &  rng,
Iterator  it,
Iterator  itE,
RealVector const &  probabilities 
) const
inline

Selects an individual from the range of individuals with prob. proportional to its fitness.

Parameters
[in]itIterator pointing to the first valid element.
[in]itEIterator pointing to the first invalid element.
[in]probabilitiesselection probabilities of the individuals

Definition at line 57 of file RouletteWheelSelection.h.

References shark::random::uni().


The documentation for this struct was generated from the following file: