ECF 1.5
Public Member Functions | Public Attributes | List of all members
MOFitness Class Reference
Inheritance diagram for MOFitness:
Fitness

Public Member Functions

bool isBetterThan (FitnessP other)
 Mandatory comparison operator. More...
 
MOFitnesscopy ()
 object copy (for duplication of an individual) More...
 
void write (XMLNode &xFitness)
 Write fitness object to XMLNode. More...
 
double getValue ()
 Return fitness value. More...
 
double getValueOfObjective (int objective)
 
double getProperty (std::string prop, int objective)
 
- Public Member Functions inherited from Fitness
virtual bool isBetterThan (FitnessP)=0
 Mandatory comparison operator. More...
 
virtual Fitnesscopy ()=0
 object copy (for duplication of an individual) More...
 
bool isValid ()
 Is fitness object up to date. More...
 
void setInvalid ()
 Set fitness object to invalid state (called after any change of individual's genotype). More...
 
virtual void setValue (double value)
 Set fitness value. More...
 
virtual double getValue ()
 Return fitness value. More...
 
virtual void write (XMLNode &)
 Write fitness object to XMLNode. More...
 
std::string toString ()
 Output fitness XML format as std::string. More...
 
virtual void read (XMLNode &xFitness)
 Read single fitness value from XML node. If the value is undefined (e.g. when reading unevaluated individual from XMLNode), validity is set to false. More...
 

Public Attributes

int nc
 
std::vector< IndividualP > * Sp
 
int rank
 
double crowding_distance
 
std::vector< double > convertedFitness
 
std::vector< double > convertedFitness2
 
- Public Attributes inherited from Fitness
uint cid
 coherence index, used in asynchronous parallel algoritmhs More...
 

Additional Inherited Members

- Protected Attributes inherited from Fitness
bool valid_
 is fitness value up-to-date More...
 
double value_
 actual fitness value More...
 
Individualindividual_
 

Detailed Description

Definition at line 12 of file MOFitness.h.

Member Function Documentation

◆ copy()

MOFitness * MOFitness::copy ( )
virtual

object copy (for duplication of an individual)

Implements Fitness.

Definition at line 27 of file MOFitness.cpp.

◆ getProperty()

double MOFitness::getProperty ( std::string  prop,
int  objective = -1 
)

Definition at line 64 of file MOFitness.cpp.

◆ getValue()

double MOFitness::getValue ( )
virtual

Return fitness value.

Reimplemented from Fitness.

Definition at line 54 of file MOFitness.cpp.

◆ getValueOfObjective()

double MOFitness::getValueOfObjective ( int  objective)

Definition at line 59 of file MOFitness.cpp.

◆ isBetterThan()

bool MOFitness::isBetterThan ( FitnessP  )
virtual

Mandatory comparison operator.

Returns
true if this object is 'better' than the given parameter fitness object

Implements Fitness.

Definition at line 5 of file MOFitness.cpp.

◆ write()

void MOFitness::write ( XMLNode &  )
virtual

Write fitness object to XMLNode.

Reimplemented from Fitness.

Definition at line 42 of file MOFitness.cpp.

Member Data Documentation

◆ convertedFitness

std::vector<double> MOFitness::convertedFitness

Definition at line 23 of file MOFitness.h.

◆ convertedFitness2

std::vector<double> MOFitness::convertedFitness2

Definition at line 24 of file MOFitness.h.

◆ crowding_distance

double MOFitness::crowding_distance

Definition at line 20 of file MOFitness.h.

◆ nc

int MOFitness::nc

Definition at line 17 of file MOFitness.h.

◆ rank

int MOFitness::rank

Definition at line 19 of file MOFitness.h.

◆ Sp

std::vector<IndividualP>* MOFitness::Sp

Definition at line 18 of file MOFitness.h.


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