GLFitnessSingleObjective< TFitness > Class Template Reference

#include <GLFitnessSingleObjective.h>

Inheritance diagram for GLFitnessSingleObjective< TFitness >:

GLFitness< TFitness > GLBaseFitness

List of all members.

Public Member Functions

 GLFitnessSingleObjective (const TFitness &value)
 GLFitnessSingleObjective (const GLFitness< TFitness > &source)
virtual ~GLFitnessSingleObjective ()
virtual void assignTo (GLBaseFitness &result) const
virtual GLBaseFitnesscopy () const
virtual std::ostream & toStream (std::ostream &out) const
virtual std::ostream & toStreamDebug (std::ostream &out) const


Detailed Description

template<class TFitness>
class GLFitnessSingleObjective< TFitness >

The only difference between this class and its parent (GLFitness) that it makes usable methods assignTo inherited from GLBaseFitness as well stream output methods toStream and toStreamDebug. It allows to collect statistics from multiple runs. It assumes, that objective value a) can be converted to double. b) can be set to output stream. The abovementioned methods will return pointer to GLFitnessSingleObjective<double>.

Definition at line 17 of file GLFitnessSingleObjective.h.


Constructor & Destructor Documentation

template<class TFitness>
GLFitnessSingleObjective< TFitness >::GLFitnessSingleObjective ( const TFitness &  value  )  [inline]

Constructor to store the value of the fitness function.

Parameters:
value fitness value.

Definition at line 24 of file GLFitnessSingleObjective.h.

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

Copying constructor.

Parameters:
source sourse of the fitness value.

Definition at line 32 of file GLFitnessSingleObjective.h.

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

Simple destructor.

Definition at line 8 of file GLFitnessSingleObjective.cpp.


Member Function Documentation

template<class TFitness >
void GLFitnessSingleObjective< TFitness >::assignTo ( GLBaseFitness result  )  const [inline, virtual]

Assigns the value of fitness function GLFitnessSingleObjective<double>. Note, that it means, that template parameter TFitness must support transformation to double.

Parameters:
result should be compatible with type GLFitnessSingleObjective<double>. E.g. this function may be used to transform GLFitness<int> to GLFitnessSingleObjective<double>.

Reimplemented from GLBaseFitness.

Definition at line 21 of file GLFitnessSingleObjective.cpp.

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

Returns the copy of the fittness class.

Returns:
the copy of this class.

Reimplemented from GLFitness< TFitness >.

Definition at line 55 of file GLFitnessSingleObjective.h.

template<class TFitness>
virtual std::ostream& GLFitnessSingleObjective< TFitness >::toStream ( std::ostream &  out  )  const [inline, virtual]

Outputs the content of the organism to output stream.

Parameters:
out output stream.

Definition at line 62 of file GLFitnessSingleObjective.h.

template<class TFitness>
virtual std::ostream& GLFitnessSingleObjective< TFitness >::toStreamDebug ( std::ostream &  out  )  const [inline, virtual]

Outputs the content of the organism to output stream in debug mode.

Parameters:
out output stream.

Definition at line 70 of file GLFitnessSingleObjective.h.


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

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