GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
Public Member Functions | List of all members
galib::ElitismSelector< GeneType > Class Template Reference

Selection strategy that chooses the best individuals for migration. More...

#include <ElitismSelector.h>

Inheritance diagram for galib::ElitismSelector< GeneType >:
[legend]

Public Member Functions

std::vector< Individual< GeneType > > selectDeme (const Population< GeneType > &population, std::size_t count) const override
 Selects the elite members of the population.
 
- Public Member Functions inherited from galib::DemeSelector< GeneType >
virtual ~DemeSelector ()=default
 

Detailed Description

template<typename GeneType>
class galib::ElitismSelector< GeneType >

Selection strategy that chooses the best individuals for migration.

Picks the top count fittest individuals from the local population to be shared with neighbors.

Template Parameters
GeneTypeThe gene type of the individuals.

Definition at line 24 of file ElitismSelector.h.

Member Function Documentation

◆ selectDeme()

template<typename GeneType >
std::vector< Individual< GeneType > > galib::ElitismSelector< GeneType >::selectDeme ( const Population< GeneType > &  population,
std::size_t  count 
) const
inlineoverridevirtual

Selects the elite members of the population.

Parameters
populationSource population.
countNumber of elites to select.
Returns
Vector of selected elite individuals.

Implements galib::DemeSelector< GeneType >.

Definition at line 33 of file ElitismSelector.h.

References galib::Population< GeneType >::size().


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