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 > &_fitnessAssignment, moeoDiversityAssignment< MOEOT > &_diversityAssignment, moeoComparator< MOEOT > &_comparator)
Full constructor.
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_fitnessAssignment, moeoDiversityAssignment< MOEOT > &_diversityAssignment)
Constructor without comparator.
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_fitnessAssignment, moeoComparator< MOEOT > &_comparator)
Constructor without moeoDiversityAssignement.
moeoElitistReplacement (moeoFitnessAssignment< MOEOT > &_fitnessAssignment)
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 > & fitnessAssignment
the fitness assignment strategy
moeoDiversityAssignment< MOEOT > & diversityAssignment
the diversity assignment strategy
moeoDummyDiversityAssignment< MOEOT > defaultDiversity
a dummy diversity assignment can be used as default
moeoFitnessThenDiversityComparator< MOEOT > defaultComparator
a fitness then diversity comparator can be used as default
moeoElitistReplacement::Cmp comparator
this object is used to compare solutions in order to sort the population

  Classes
class Cmp
this object 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 26 of file moeoElitistReplacement.h.

Constructor & Destructor Documentation

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

Full constructor.

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

Definition at line 36 of file moeoElitistReplacement.h.

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

Constructor without comparator.

A moeoFitThenDivComparator is used as default.

Parameters:
    _fitnessAssignment the fitness assignment strategy
    _diversityAssignment the diversity assignment strategy

Definition at line 46 of file moeoElitistReplacement.h.

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

Constructor without moeoDiversityAssignement.

A dummy diversity is used as default.

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

Definition at line 56 of file moeoElitistReplacement.h.

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

Constructor without moeoDiversityAssignement nor moeoComparator.

A moeoFitThenDivComparator and a dummy diversity are used as default.

Parameters:
    _fitnessAssignment the fitness assignment strategy

Definition at line 66 of file moeoElitistReplacement.h.

Member Function Documentation

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

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

Definition at line 76 of file moeoElitistReplacement.h.

References moeoElitistReplacement< MOEOT >::comparator, moeoElitistReplacement< MOEOT >::diversityAssignment, and moeoElitistReplacement< MOEOT >::fitnessAssignment.

Author

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