ECF 1.5
|
#include <Fitness.h>
Public Member Functions | |
virtual bool | isBetterThan (FitnessP)=0 |
Mandatory comparison operator. More... | |
virtual Fitness * | copy ()=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 | |
uint | cid |
coherence index, used in asynchronous parallel algoritmhs More... | |
Protected Attributes | |
bool | valid_ |
is fitness value up-to-date More... | |
double | value_ |
actual fitness value More... | |
Individual * | individual_ |
Fitness base class.
A fitness object is used to represent individual's appropriateness for the problem.
|
pure virtual |
object copy (for duplication of an individual)
Implemented in FitnessMax, FitnessMin, MOFitness, LexiCaseFitnessMin, LexiCaseFitnessMin, and LexiCaseFitnessMin.
|
inlinevirtual |
Return fitness value.
Reimplemented in MOFitness, LexiCaseFitnessMin, LexiCaseFitnessMin, and LexiCaseFitnessMin.
|
pure virtual |
Mandatory comparison operator.
Implemented in FitnessMax, FitnessMin, and MOFitness.
|
inline |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
Write fitness object to XMLNode.
Reimplemented in FitnessMax, FitnessMin, LexiCaseFitnessMin, LexiCaseFitnessMin, LexiCaseFitnessMin, and MOFitness.
uint Fitness::cid |
|
protected |