GLBaseFitness Class Reference

#include <GLBaseFitness.h>

Inheritance diagram for GLBaseFitness:

GLFitness< TFitness > GLFitness< TFitness > GLFitnessSingleObjective< TFitness >

List of all members.

Classes

class  CompareFitness

Public Member Functions

 GLBaseFitness ()
virtual ~GLBaseFitness ()
virtual void assignTo (GLBaseFitness &result) const
virtual GLBaseFitnesscopy () const =0
virtual bool isEqual (const GLBaseFitness *fitness) const =0
virtual bool isLess (const GLBaseFitness *fitness) const =0


Detailed Description

Base class for fitness value storage. The main purpose of this class to unify organisms for multiple and single objectives.

Definition at line 10 of file GLBaseFitness.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
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.

Returns:
the copy of this 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.

Parameters:
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.

Parameters:
fitness pointer to fitness to make a comparison with.

Implemented in GLFitness< TFitness >, and GLFitness< TFitness >.


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

Generated on Sat Jun 13 13:58:05 2009 for GenLib by  doxygen 1.5.9