- 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 > &_fitnessAssignment, moeoDiversityAssignment< MOEOT > &_diversityAssignment, moeoComparator< MOEOT > &_comparator)
| Full constructor.
| moeoEnvironmentalReplacement (moeoFitnessAssignment< MOEOT > &_fitnessAssignment, moeoDiversityAssignment< MOEOT > &_diversityAssignment)
| Constructor without comparator.
| moeoEnvironmentalReplacement (moeoFitnessAssignment< MOEOT > &_fitnessAssignment, moeoComparator< MOEOT > &_comparator)
| Constructor without moeoDiversityAssignement.
| moeoEnvironmentalReplacement (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
moeoEnvironmentalReplacement::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 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 26 of file moeoEnvironmentalReplacement.h.

## Constructor & Destructor Documentation

template<class MOEOT>

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

template<class MOEOT>

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

template<class MOEOT>

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

template<class MOEOT>

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

## Member Function Documentation

template<class MOEOT>

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

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

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

- moeoEnvironmentalReplacement.h