- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# moeoEnvironmentalReplacement< MOEOT > Class Template Reference

Environmental replacement strategy that consists in keeping the N best individuals by deleting individuals 1 by 1 and by updating the fitness and diversity values after each deletion. More...

`#include <moeoEnvironmentalReplacement.h>`

Inheritance diagram for moeoEnvironmentalReplacement< MOEOT >:

List of all members.

## Public Types
typedef MOEOT::ObjectiveVector | ObjectiveVector
| The type for objective vector.
## Public Member Functions
| moeoEnvironmentalReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness, moeoDiversityAssignment< MOEOT > &_evalDiversity, moeoComparator< MOEOT > &_comparator)
| Full constructor.
| moeoEnvironmentalReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness, moeoDiversityAssignment< MOEOT > &_evalDiversity)
| Constructor without comparator.
| moeoEnvironmentalReplacement (moeoFitnessAssignment< MOEOT > &_evalFitness, moeoComparator< MOEOT > &_comparator)
| Constructor without moeoDiversityAssignement.
| moeoEnvironmentalReplacement (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. More...

## Detailed Description

### template<class MOEOT>
class moeoEnvironmentalReplacement< MOEOT >

Environmental replacement strategy that consists in keeping the N best individuals by deleting individuals 1 by 1 and by updating the fitness and diversity values after each deletion.

Definition at line 25 of file moeoEnvironmentalReplacement.h.

## Constructor & Destructor Documentation

template<class MOEOT>

moeoEnvironmentalReplacement< MOEOT >::moeoEnvironmentalReplacement | ( | 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 39 of file moeoEnvironmentalReplacement.h.

template<class MOEOT>

moeoEnvironmentalReplacement< MOEOT >::moeoEnvironmentalReplacement | ( | 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 49 of file moeoEnvironmentalReplacement.h.

template<class MOEOT>

moeoEnvironmentalReplacement< MOEOT >::moeoEnvironmentalReplacement | ( | 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 59 of file moeoEnvironmentalReplacement.h.

template<class MOEOT>

moeoEnvironmentalReplacement< MOEOT >::moeoEnvironmentalReplacement | ( | 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 69 of file moeoEnvironmentalReplacement.h.

## Member Function Documentation

template<class MOEOT>

void moeoEnvironmentalReplacement< 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 79 of file moeoEnvironmentalReplacement.h.

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

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

- moeoEnvironmentalReplacement.h