ECF 1.5
Public Member Functions | List of all members

Fitness for maximization problems. More...

#include <FitnessMax.h>

Inheritance diagram for FitnessMax:
Fitness

Public Member Functions

bool isBetterThan (FitnessP other)
 Mandatory comparison operator. More...
 
void write (XMLNode &)
 Write fitness object to XMLNode. More...
 
FitnessMaxcopy ()
 object copy (for duplication of an individual) More...
 
- 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...
 

Additional Inherited Members

- Public Attributes inherited from Fitness
uint cid
 coherence index, used in asynchronous parallel algoritmhs More...
 
- Protected Attributes inherited from Fitness
bool valid_
 is fitness value up-to-date More...
 
double value_
 actual fitness value More...
 
Individualindividual_
 

Detailed Description

Fitness for maximization problems.

Fitness is better if the fitness value is greater.

Definition at line 12 of file FitnessMax.h.

Constructor & Destructor Documentation

◆ FitnessMax()

FitnessMax::FitnessMax ( )
inline

Definition at line 15 of file FitnessMax.h.

Member Function Documentation

◆ copy()

FitnessMax * FitnessMax::copy ( )
virtual

object copy (for duplication of an individual)

Implements Fitness.

Definition at line 12 of file FitnessMax.cpp.

◆ isBetterThan()

bool FitnessMax::isBetterThan ( FitnessP  )
virtual

Mandatory comparison operator.

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

Implements Fitness.

Definition at line 6 of file FitnessMax.cpp.

◆ write()

void FitnessMax::write ( XMLNode &  )
virtual

Write fitness object to XMLNode.

Reimplemented from Fitness.

Definition at line 19 of file FitnessMax.cpp.


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