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

Replacement procedure which replaces the worst individual in the population with the new offspring. More...

#include <ReplaceWorst.h>

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

Public Member Functions

vector< S > replace (vector< S > &vector1, vector< S > &vector2) override
 Replaces the worst individual in the population for the best in offspring. Offspring must be of size 1. 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 ReplaceWorst< S >

Replacement procedure which replaces the worst individual in the population with the new offspring.

Template Parameters
S

Member Function Documentation

◆ replace() [1/2]

template<class S >
vector< S > ReplaceWorst< 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 > ReplaceWorst< S >::replace ( vector< S > &  population,
vector< S > &  offspring 
)
overridevirtual

Replaces the worst individual in the population for the best in offspring. Offspring must be of size 1.

Template Parameters
S
Parameters
vector1
vector2
Returns

Implements Replacement< S >.


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