#include <GLBaseFitness.h>
Classes | |
class | CompareFitness |
Public Member Functions | |
GLBaseFitness () | |
virtual | ~GLBaseFitness () |
virtual void | assignTo (GLBaseFitness &result) const |
virtual GLBaseFitness * | copy () const =0 |
virtual bool | isEqual (const GLBaseFitness *fitness) const =0 |
virtual bool | isLess (const GLBaseFitness *fitness) const =0 |
Definition at line 10 of file GLBaseFitness.h.
GLBaseFitness::GLBaseFitness | ( | ) | [inline] |
Simple constructor.
Definition at line 16 of file GLBaseFitness.h.
virtual GLBaseFitness::~GLBaseFitness | ( | ) | [inline, virtual] |
Simple destructor
Definition at line 21 of file GLBaseFitness.h.
virtual void GLBaseFitness::assignTo | ( | GLBaseFitness & | result | ) | const [inline, virtual] |
Method to assign the value of fitness function to another one. Unlike copying constructor it may be used to transform the family of fitness classes to 'common denominator'. The resulting fitness not necessarily should be of the same type as the current one. The purpose of this method is to make the collection of statistics for multiple runs easier and more general.
result | fitness, which has the same value as current one, but may be transformed to another type. E.g. this function may be called to transform GLFitness<int> to GLFitness<double>. |
Reimplemented in GLFitnessSingleObjective< TFitness >.
Definition at line 34 of file GLBaseFitness.h.
virtual GLBaseFitness* GLBaseFitness::copy | ( | ) | const [pure virtual] |
Returns the copy of the fittness class.
Implemented in GLFitness< TFitness >, GLFitnessSingleObjective< TFitness >, and GLFitness< TFitness >.
virtual bool GLBaseFitness::isEqual | ( | const GLBaseFitness * | fitness | ) | const [pure virtual] |
Returns true if 2 fitness values are equal.
fitness | pointer to fitness to make comparison with. |
Implemented in GLFitness< TFitness >, and GLFitness< TFitness >.
virtual bool GLBaseFitness::isLess | ( | const GLBaseFitness * | fitness | ) | const [pure virtual] |
Returns true if this fitness is less then the one passed as a parameter.
fitness | pointer to fitness to make a comparison with. |
Implemented in GLFitness< TFitness >, and GLFitness< TFitness >.