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

Replacement procedure which compares the individuals of the current population with the offspring individuals. For each individual i, the offspring and the parent at the ith position are compared and the fittest survives. More...

#include <FirstImprove.h>

Inheritance diagram for FirstImprove< S >:
Replacement< S >

Public Member Functions

vector< S > replace (vector< S > &vector1, vector< S > &vector2) override
 First Improve replacement logic. Loops both vector of individuals doing pairwise comparisons for each ith individual in both vectors. The final population contains the best individuals at each ith position. More...
 
vector< S > replace (vector< S > &vector1, const S &solution, const int &position) override
 Not implemented for this replacement. More...
 
string getName () const override
 

Detailed Description

template<class S>
class FirstImprove< S >

Replacement procedure which compares the individuals of the current population with the offspring individuals. For each individual i, the offspring and the parent at the ith position are compared and the fittest survives.

Template Parameters
S

Member Function Documentation

◆ replace() [1/2]

template<class S >
vector< S > FirstImprove< S >::replace ( vector< S > &  vector1,
const S &  solution,
const int &  position 
)
overridevirtual

Not implemented for this replacement.

Template Parameters
S
Parameters
vector1
solution
position
Returns
vector

Implements Replacement< S >.

◆ replace() [2/2]

template<class S >
vector< S > FirstImprove< S >::replace ( vector< S > &  population,
vector< S > &  offspring 
)
overridevirtual

First Improve replacement logic. Loops both vector of individuals doing pairwise comparisons for each ith individual in both vectors. The final population contains the best individuals at each ith position.

Template Parameters
S
Parameters
population
offspring
Returns

Implements Replacement< S >.


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