GLFitness< TFitness > Class Template Reference

#include <GLFitness.h>

Inheritance diagram for GLFitness< TFitness >:

GLBaseFitness

List of all members.

Public Member Functions

 GLFitness (const TFitness &value)
 GLFitness (const GLFitness< TFitness > &source)
virtual ~GLFitness ()
virtual GLBaseFitnesscopy () const
const TFitness & getValue () const
virtual bool isEqual (const GLBaseFitness *fitness) const
virtual bool isLess (const GLBaseFitness *fitness) const
void setValue (const TFitness &value)


Detailed Description

template<class TFitness>
class GLFitness< TFitness >

Class for storage the fitness information. It is highly desirable, that TFitness type was 'comparable' so it can be used in comparison operations for organisms ranking etc.

Definition at line 11 of file GLFitness.h.


Constructor & Destructor Documentation

template<class TFitness>
GLFitness< TFitness >::GLFitness ( const TFitness &  value  ) 

Constructor to store the value of the fittness function.

Parameters:
value fitness value.

template<class TFitness>
GLFitness< TFitness >::GLFitness ( const GLFitness< TFitness > &  source  ) 

Copying constructor.

Parameters:
source sourse of the fitness value.

template<class TFitness>
virtual GLFitness< TFitness >::~GLFitness (  )  [inline, virtual]

Simple destructor.

Definition at line 29 of file GLFitness.h.


Member Function Documentation

template<class TFitness>
virtual GLBaseFitness* GLFitness< TFitness >::copy (  )  const [inline, virtual]

Returns the copy of the fittness class.

Returns:
the copy of this class.

Implements GLBaseFitness.

Reimplemented in GLFitnessSingleObjective< TFitness >.

Definition at line 35 of file GLFitness.h.

template<class TFitness>
const TFitness& GLFitness< TFitness >::getValue (  )  const [inline]

Returns the fitness value.

Returns:
the fitness value.

Definition at line 42 of file GLFitness.h.

template<class TFitness>
virtual bool GLFitness< TFitness >::isEqual ( const GLBaseFitness fitness  )  const [virtual]

Returns true if 2 fitness values are equal.

Implements GLBaseFitness.

template<class TFitness>
virtual bool GLFitness< TFitness >::isLess ( const GLBaseFitness fitness  )  const [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.

Implements GLBaseFitness.

template<class TFitness>
void GLFitness< TFitness >::setValue ( const TFitness &  value  )  [inline]

Sets the value of the fitness.

Parameters:
value new value of the fitness.

Definition at line 61 of file GLFitness.h.


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

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