In file EO++.h:

template <class fitnessT = float> class urEO

Base class for chromosomes, it's a very basic class, which does not require anything but a fitness and an ID; and it know how to evaluate fitness itself

Public Fields

typedef fitnessT EOFitT

Public Methods

virtual fitnessT fitness()
Fitness things: reads fitness; if itīs not evaluated, it calls the evaluation function
void ID( const string& _id )
Write ID
const string& ID()
read the ID, which is supposed to be an unique identification for each chromosome
const urEO& operator = ( const urEO& _u )
Asignement operator
urEO( const urEO& _u)
Copy ctor
urEO( const EOEvalFunc< urEO<fitnessT> > _ef, const string& _ID = "" )
Ctor
virtual ~urEO()
To make it virtual

Protected Methods

void invalidateFitness()
Should be called whenever the internal representation of the EO changes, and thus fitness is not valid

Documentation

Base class for chromosomes, it's a very basic class, which does not require anything but a fitness and an ID; and it know how to evaluate fitness itself. this is what the population-related classed need to know about an EO: only how to create one from another, and its fitness.
This urEO is completely independent of representation; subclasses should call invalidateFitness each time the representation changes; urEO uses lazy evaluation; fitness is not computed until it is needed.
Fitness must have a ctor that takes no parameter, so that it can be instantiated.

typedef fitnessT EOFitT

urEO( const EOEvalFunc< urEO<fitnessT> > _ef, const string& _ID = "" )
Ctor
Parameters:
_ef - Evaluation Function; will be called, if needed, each time the fitness is read
_ID - ID, not required, that might be unique

urEO( const urEO& _u)
Copy ctor

const urEO& operator = ( const urEO& _u )
Asignement operator

virtual ~urEO()
To make it virtual

virtual fitnessT fitness()
Fitness things: reads fitness; if itīs not evaluated, it calls the evaluation function

const string& ID()
read the ID, which is supposed to be an unique identification for each chromosome. It should be set only at birth

void ID( const string& _id )
Write ID

void invalidateFitness()
Should be called whenever the internal representation of the EO changes, and thus fitness is not valid


This class has no child classes.
Author:
GeNeura Team

alphabetic index hierarchy of classes


BinOp