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

Interface for selection operators. More...

#include <Selection.h>

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

Public Member Functions

virtual ~Selection ()=default
 
virtual const Individual< GeneType > & select (const Population< GeneType > &population)=0
 Selects one individual from the population.
 

Detailed Description

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

Interface for selection operators.

Selection operators choose individuals from a population to act as parents for the next generation, typically biasing towards more fit individuals.

Template Parameters
GeneTypeThe numeric type of the genes.

Definition at line 20 of file Selection.h.

Constructor & Destructor Documentation

◆ ~Selection()

template<typename GeneType >
virtual galib::Selection< GeneType >::~Selection ( )
virtualdefault

Member Function Documentation

◆ select()

template<typename GeneType >
virtual const Individual< GeneType > & galib::Selection< GeneType >::select ( const Population< GeneType > &  population)
pure virtual

Selects one individual from the population.

Parameters
populationThe source population.
Returns
Constant reference to the selected individual.

Implemented in galib::TournamentSelection< GeneType >.


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