5typedef boost::shared_ptr<Individual> IndividualP;
7typedef boost::shared_ptr<Fitness> FitnessP;
59 virtual void write(XMLNode&) { }
66 char *s = xFit.createXMLString();
76 virtual void read(XMLNode& xFitness)
78 XMLCSTR val = xFitness.getAttributeValue();
90typedef boost::shared_ptr<Fitness> FitnessP;
virtual void read(XMLNode &xFitness)
Read single fitness value from XML node. If the value is undefined (e.g. when reading unevaluated ind...
uint cid
coherence index, used in asynchronous parallel algoritmhs
virtual void write(XMLNode &)
Write fitness object to XMLNode.
void setInvalid()
Set fitness object to invalid state (called after any change of individual's genotype).
virtual Fitness * copy()=0
object copy (for duplication of an individual)
bool valid_
is fitness value up-to-date
std::string toString()
Output fitness XML format as std::string.
double value_
actual fitness value
virtual bool isBetterThan(FitnessP)=0
Mandatory comparison operator.
virtual double getValue()
Return fitness value.
bool isValid()
Is fitness object up to date.
virtual void setValue(double value)
Set fitness value.
Individual class - inherits a vector of Genotype objects.