Public Member Functions | Public Attributes | Protected Attributes

Fitness Class Reference
[Evolutionary FrameworkMain Classes]

Fitness base class. More...

#include <Fitness.h>

Inheritance diagram for Fitness:
FitnessMax FitnessMin MOFitness

List of all members.

Public Member Functions

virtual bool isBetterThan (FitnessP)=0
 Mandatory comparison operator.
virtual Fitnesscopy ()=0
 object copy (for duplication of an individual)
bool isValid ()
 Is fitness object up to date.
void setInvalid ()
 Set fitness object to invalid state (called after any change of individual's genotype).
virtual void setValue (double value)
 Set fitness value.
virtual double getValue ()
 Return fitness value.
virtual void write (XMLNode &)
 Write fitness object to XMLNode.
std::string toString ()
 Output fitness XML format as std::string.
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.

Public Attributes

unsigned int cid
 coherence index, used in asynchronous parallel algoritmhs

Protected Attributes

bool valid_
 is fitness value up-to-date
double value_
 actual fitness value

Detailed Description

Fitness base class.

A fitness object is used to represent individual's appropriateness for the problem.

Definition at line 15 of file Fitness.h.

Member Function Documentation

virtual bool Fitness::isBetterThan ( FitnessP   )  [pure virtual]

Mandatory comparison operator.

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

Implemented in FitnessMax, FitnessMin, and MOFitness.

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