dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
Selection< S > Class Template Referenceabstract

Abstract Selection interface. More...

#include <Selection.h>

Inheritance diagram for Selection< S >:
BinaryTournamentSelection< S >

Public Member Functions

virtual S select (const vector< S > &population)=0
 Method to perform the selection operation. This is a virtual method that must be implemented in the subclasses. It receives population of individuals and performs the corresponding selection over it. More...
 
virtual void select (const vector< S > &population, int &parent)=0
 Method to perform the selection operation. This is a virtual method that must be implemented in the subclasses. It receives population of individuals and a parent number, it performs the corresponding selection over the population and sets the index of the parent in the parent variable. More...
 
virtual std::string getName () const =0
 

Detailed Description

template<class S>
class Selection< S >

Abstract Selection interface.

Template Parameters
SType of individual in the population

Member Function Documentation

◆ select() [1/2]

template<class S >
virtual S Selection< S >::select ( const vector< S > &  population)
pure virtual

Method to perform the selection operation. This is a virtual method that must be implemented in the subclasses. It receives population of individuals and performs the corresponding selection over it.

Parameters
population
Returns
S An individual selected from the population

Implemented in BinaryTournamentSelection< S >.

◆ select() [2/2]

template<class S >
virtual void Selection< S >::select ( const vector< S > &  population,
int &  parent 
)
pure virtual

Method to perform the selection operation. This is a virtual method that must be implemented in the subclasses. It receives population of individuals and a parent number, it performs the corresponding selection over the population and sets the index of the parent in the parent variable.

Parameters
populationPopulation of individuals
parentIndex of the parent in the population

Implemented in BinaryTournamentSelection< S >.


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