moeoElitistReplacement(3)

NAME
moeoElitistReplacement - Elitist replacement strategy that consists in keeping the N best individuals.

SYNOPSIS

#include <moeoElitistReplacement.h>

Inherits moeoReplacement< MOEOT >< MOEOT >.

  Public Member Functions
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness, moeoDiversityAssignment< MOEOT > &_evalDiversity, moeoComparator< MOEOT > &_comparator)
Full constructor.
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness, moeoDiversityAssignment< MOEOT > &_evalDiversity)
Constructor without comparator.
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness, moeoComparator< MOEOT > &_comparator)
Constructor without moeoDiversityAssignement.
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness)
Constructor without moeoDiversityAssignement nor moeoComparator.
void operator() (eoPop< MOEOT > &_parents, eoPop< MOEOT > &_offspring)
Replaces the first population by adding the individuals of the second one, sorting with a moeoComparator and resizing the whole population obtained.

  Protected Attributes
moeoFitnessAssignment< MOEOT > & evalFitness
the fitness assignment strategy
moeoDiversityAssignment< MOEOT > & evalDiversity
the diversity assignment strategy
moeoComparator< MOEOT > & comparator
the comparator (used to compare 2 individuals)

  Classes
class Cmp
This class is used to compare solutions in order to sort the population.

Detailed Description

  template<class MOEOT> class moeoElitistReplacement< MOEOT >
Elitist replacement strategy that consists in keeping the N best individuals.

Definition at line 24 of file moeoElitistReplacement.h.

Constructor & Destructor Documentation

  template<class MOEOT> moeoElitistReplacement< MOEOT >::moeoElitistReplacement (moeoFitnessAssignment< MOEOT > & _evalFitness, moeoDiversityAssignment< MOEOT > & _evalDiversity, moeoComparator< MOEOT > & _comparator) [inline]

Full constructor.

Parameters:
    _evalFitness the fitness assignment strategy
    _evalDiversity the diversity assignment strategy
    _comparator the comparator (used to compare 2 individuals)

Definition at line 34 of file moeoElitistReplacement.h.

  template<class MOEOT> moeoElitistReplacement< MOEOT >::moeoElitistReplacement (moeoFitnessAssignment< MOEOT > & _evalFitness, moeoDiversityAssignment< MOEOT > & _evalDiversity) [inline]

Constructor without comparator.

A moeoFitThenDivComparator is used as default.

Parameters:
    _evalFitness the fitness assignment strategy
    _evalDiversity the diversity assignment strategy

Definition at line 44 of file moeoElitistReplacement.h.

  template<class MOEOT> moeoElitistReplacement< MOEOT >::moeoElitistReplacement (moeoFitnessAssignment< MOEOT > & _evalFitness, moeoComparator< MOEOT > & _comparator) [inline]

Constructor without moeoDiversityAssignement.

A dummy diversity is used as default.

Parameters:
    _evalFitness the fitness assignment strategy
    _comparator the comparator (used to compare 2 individuals)

Definition at line 54 of file moeoElitistReplacement.h.

  template<class MOEOT> moeoElitistReplacement< MOEOT >::moeoElitistReplacement (moeoFitnessAssignment< MOEOT > & _evalFitness) [inline]

Constructor without moeoDiversityAssignement nor moeoComparator.

A moeoFitThenDivComparator and a dummy diversity are used as default.

Parameters:
    _evalFitness the fitness assignment strategy

Definition at line 64 of file moeoElitistReplacement.h.

Member Function Documentation

  template<class MOEOT> void moeoElitistReplacement< MOEOT >::operator() (eoPop< MOEOT > & _parents, eoPop< MOEOT > & _offspring) [inline, virtual]

Replaces the first population by adding the individuals of the second one, sorting with a moeoComparator and resizing the whole population obtained.

Parameters:
    _parents the population composed of the parents (the population you want to replace)
    _offspring the offspring population

Implements eoBF< eoPop< MOEOT > &, eoPop< MOEOT > &, void >.

Definition at line 74 of file moeoElitistReplacement.h.

References moeoElitistReplacement< MOEOT >::comparator, moeoElitistReplacement< MOEOT >::evalDiversity, and moeoElitistReplacement< MOEOT >::evalFitness.

Author

Generated automatically by Doxygen for ParadisEO-MOEO from the source code.