shark::LinearRankingSelection< Ordering > Struct Template Reference

Implements a fitness-proportional selection scheme for mating selection that scales the fitness values linearly before carrying out the actual selection. More...

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

Public Member Functions

 LinearRankingSelection ()
 
template<typename RngType , typename InIterator , typename OutIterator >
void operator() (RngType &rng, InIterator individuals, InIterator individualsE, OutIterator out, OutIterator outE) const
 Selects individualss from the range of parent and offspring individuals. More...
 

Public Attributes

double etaMax
 Selective pressure, parameter in [1,2] conrolling selection strength. 1.1 by default. More...
 

Detailed Description

template<typename Ordering>
struct shark::LinearRankingSelection< Ordering >

Implements a fitness-proportional selection scheme for mating selection that scales the fitness values linearly before carrying out the actual selection.

The algorithm is described in: James E. Baker. Adaptive Selection Methods for Genetic Algorithms. In John J. Grefenstette (ed.): Proceedings of the 1st International Conference on Genetic Algorithms (ICGA), pp. 101-111, Lawrence Erlbaum Associates, 1985

Definition at line 57 of file LinearRanking.h.

Constructor & Destructor Documentation

◆ LinearRankingSelection()

template<typename Ordering >
shark::LinearRankingSelection< Ordering >::LinearRankingSelection ( )
inline

Definition at line 58 of file LinearRanking.h.

References shark::LinearRankingSelection< Ordering >::etaMax.

Member Function Documentation

◆ operator()()

template<typename Ordering >
template<typename RngType , typename InIterator , typename OutIterator >
void shark::LinearRankingSelection< Ordering >::operator() ( RngType &  rng,
InIterator  individuals,
InIterator  individualsE,
OutIterator  out,
OutIterator  outE 
) const
inline

Selects individualss from the range of parent and offspring individuals.

The operator carries out the following steps:

  • Calculate selection probabilities of parent and offspring individualss according to their rank, which is determined by the ordering relation
  • Carry out roulette wheel selection on the range of parent and offspring individualss until the output range is filled.
Parameters
[in]individualsIterator pointing to the first valid individual.
[in]individualsEIterator pointing to the first invalid individual.
[in]outIterator pointing to the first valid element of the output range.
[in]outEIterator pointing to the first invalid element of the output range.

Definition at line 75 of file LinearRanking.h.

Member Data Documentation

◆ etaMax

template<typename Ordering >
double shark::LinearRankingSelection< Ordering >::etaMax

Selective pressure, parameter in [1,2] conrolling selection strength. 1.1 by default.

Definition at line 111 of file LinearRanking.h.

Referenced by shark::LinearRankingSelection< Ordering >::LinearRankingSelection().


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