Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages | Search for

# eoParetoOneConstraintFitness< FitnessTraits > Class Template Reference

eoParetoOneConstraintFitness class: std::vector of doubles + constraint value More...

`#include <eoParetoConstraintFitness.h>`

List of all members.

## Public Types
typedef FitnessTraits | fitness_traits
## Public Member Functions
| eoParetoOneConstraintFitness (std::vector< double > &_v)
| eoParetoOneConstraintFitness (std::vector< double > &_v, double _c)
bool | feasible () const
double | violation () const
double | ConstraintValue () const
void | ConstraintValue (double _c)
bool | dominates (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
| Partial order based on Pareto-dominance.
bool | operator< (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
| compare *not* on dominance, but on the first, then the second, etc
bool | operator> (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
bool | operator<= (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
bool | operator>= (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
bool | operator== (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
bool | operator!= (const eoParetoOneConstraintFitness< FitnessTraits > &_other) const
## Static Public Member Functions
void | setUp (unsigned _n, std::vector< bool > &_b)
| access to the traits characteristics (so you don't have to write a lot of typedef's around
bool | maximizing (unsigned _i)
## Private Attributes
double | constraintValue

## Detailed Description

### template<class FitnessTraits = eoParetoFitnessTraits>
class eoParetoOneConstraintFitness< FitnessTraits >

eoParetoOneConstraintFitness class: std::vector of doubles + constraint value

Comparison (dominance) is done on pareto dominance for 2 feasible individuals, one feasible individual always wins over an infeasible on constraint violations for 2 infeasible individuals

The template argument FitnessTraits defaults to eoParetoFitnessTraits, which can be replaces at will by any other class that implements the static functions defined therein.

Note that the domninance defines a partial order, so that !dominates(a,b) && !domaintes(b,a) does not neccessarily imply that (a==b) The other way around does hold.

However, be careful that the comparison operators do define a total order based on considering first objective, then in case of tie, second objective, etc

NOTE: in a hurry, I did not want to make it derive from eoParetoFitness (used cut-and-paste instead!) : I know it might be a good idea, but I'm not sure I see why at the moment (any hint someone?)

Definition at line 61 of file eoParetoConstraintFitness.h.

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

- eoParetoConstraintFitness.h