ObjectiveFunction Class Reference

Base class of all objective functions. More...

#include <ObjectiveFunction.h>

Inheritance diagram for ObjectiveFunction:
ObjectiveFunctionT< T > ObjectiveFunctionT< double * > ObjectiveFunctionT< long * > ObjectiveFunctionT< T * > ObjectiveFunctionVS< double > ObjectiveFunctionVS< long > ObjectiveFunctionVS< T > Ackley BhinKorn CIGTAB2 CIGTABBase DiffPow DTLZ1 DTLZ2 DTLZ3 DTLZ4 DTLZ5 DTLZ6 DTLZ7 ELLI2 ELLIBase Griewangk IHR1 IHR2 IHR3 IHR6 LZ06_F1 LZ06_F2 LZ07_F1 LZ07_F2 LZ07_F3 LZ07_F4 LZ07_F5 LZ07_F6 LZ07_F7 LZ07_F8 LZ07_F9 NoisySphere RandomFitness Rastrigin Rosenbrock Schaffer Schwefel SchwefelEllipsoid Sphere Superspheres TransformedObjectiveFunction ZDT1 ZDT2 ZDT3 ZDT4 ZDT6 ZZJ07_F1 ZZJ07_F10 ZZJ07_F2 ZZJ07_F3 ZZJ07_F4 ZZJ07_F5 ZZJ07_F6 ZZJ07_F7 ZZJ07_F8 ZZJ07_F9 ZDT5

List of all members.

Public Member Functions

 ObjectiveFunction ()
 Constructor.
virtual ~ObjectiveFunction ()
 Destructor.
unsigned timesCalled () const
 return the number of function evaluations so far
void resetTimesCalled ()
 reset the number of function evaluations to zero
const std::string & name () const
 return the name of this functions
virtual unsigned int objectives () const =0
 return the number of objectives to optimize

Protected Attributes

unsigned m_timesCalled
 number of function evaluations
std::string m_name
 function name

Detailed Description

Base class of all objective functions.

The ObjectiveFunction base class does not provide any interface for function evaluations. It just holds a variable to count the number of function evaluations. The main purpose of this class is to serve as a general non-template superclass of all objective functions, such that any objective function can be cast into this type. As a convenience feature each objective function can be given a name. This should be done in the constructor of a sub-class.

Definition at line 168 of file ObjectiveFunction.h.


Constructor & Destructor Documentation

ObjectiveFunction::ObjectiveFunction (  ) 

Constructor.

Definition at line 128 of file ObjectiveFunction.cpp.

ObjectiveFunction::~ObjectiveFunction (  )  [virtual]

Destructor.

Definition at line 133 of file ObjectiveFunction.cpp.


Member Function Documentation

const std::string& ObjectiveFunction::name (  )  const [inline]

return the name of this functions

Definition at line 184 of file ObjectiveFunction.h.

References m_name.

void ObjectiveFunction::resetTimesCalled (  )  [inline]

reset the number of function evaluations to zero

Definition at line 181 of file ObjectiveFunction.h.

References m_timesCalled.

unsigned ObjectiveFunction::timesCalled (  )  const [inline]

return the number of function evaluations so far

Examples:
paraboloidCMA.cpp, and SchwefelEllipsoidCMSA.cpp.

Definition at line 178 of file ObjectiveFunction.h.

References m_timesCalled.


Member Data Documentation


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