#include <eoMOFitness.h>
Public Types | |
typedef FitnessTraits | fitness_traits |
Public Member Functions | |
eoMOFitness (double def) | |
eoMOFitness (std::vector< double > &_v) | |
eoMOFitness (const eoMOFitness< FitnessTraits > &org) | |
eoMOFitness< FitnessTraits > & | operator= (const eoMOFitness< FitnessTraits > &org) |
void | reset () |
void | setFeasible (unsigned objective) |
void | setWorth (double worth_) |
double | getWorth () const |
bool | validWorth () const |
void | invalidateWorth () |
int | check_dominance (const eoMOFitness< FitnessTraits > &_other) const |
Check on dominance: returns 0 if non-dominated, 1 if this dominates other, -1 if other dominates this. | |
std::vector< double > | normalized () const |
normalized fitness: all maximizing, removed the irrelevant ones | |
bool | dominates (const eoMOFitness< FitnessTraits > &_other) const |
returns true if this dominates other | |
bool | operator< (const eoMOFitness< FitnessTraits > &_other) const |
compare *not* on dominance, but on worth | |
bool | operator> (const eoMOFitness< FitnessTraits > &_other) const |
bool | operator<= (const eoMOFitness< FitnessTraits > &_other) const |
bool | operator>= (const eoMOFitness< FitnessTraits > &_other) const |
bool | operator== (const eoMOFitness< FitnessTraits > &_other) const |
bool | operator!= (const eoMOFitness< FitnessTraits > &_other) const |
Private Attributes | |
double | worth |
bool | worthValid |
Friends | |
std::ostream & | operator<< (std::ostream &os, const eoMOFitness< FitnessTraits > &fitness) |
std::istream & | operator>> (std::istream &is, eoMOFitness< FitnessTraits > &fitness) |
Comparison is done on 'worth'. This worth needs to be set elsewhere. The template argument FitnessTraits defaults to eMOFitnessTraits, which can be replaces at will by any other class that implements the static functions defined therein.
Note that the comparison defines a partial order, so that !(a < b) && !(b <a) does not neccessarily imply that (a==b) The other way around does hold.
Definition at line 159 of file eoMOFitness.h.