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

Replacement strategy that replaces the least fit individuals. More...

#include <WorstReplacer.h>

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

Public Member Functions

void replaceDeme (Population< GeneType > &population, std::vector< Individual< GeneType > > &&deme) const override
 Replaces the worst local individuals.
 
- Public Member Functions inherited from galib::DemeReplacer< GeneType >
virtual ~DemeReplacer ()=default
 

Detailed Description

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

Replacement strategy that replaces the least fit individuals.

Identifies the worst N individuals in the local population and replaces them with the N arrived migrants.

Template Parameters
GeneTypeThe gene type of the individuals.

Definition at line 24 of file WorstReplacer.h.

Member Function Documentation

◆ replaceDeme()

template<typename GeneType >
void galib::WorstReplacer< GeneType >::replaceDeme ( Population< GeneType > &  population,
std::vector< Individual< GeneType > > &&  deme 
) const
inlineoverridevirtual

Replaces the worst local individuals.

Parameters
populationLocal population.
demeIncoming migrants.

Implements galib::DemeReplacer< GeneType >.

Definition at line 32 of file WorstReplacer.h.

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


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