Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InvertedFitnessStrategy Class Reference

This strategy calculate the invert to a other strategy. More...

#include <InvertedFitnessStrategy.h>

Inheritance diagram for InvertedFitnessStrategy:
Collaboration diagram for InvertedFitnessStrategy:

Public Member Functions

 InvertedFitnessStrategy (IFitnessStrategy *strategy)
 constructor Needs a other fitness strategy, which should be inverted. More...
 
virtual ~InvertedFitnessStrategy ()
 default destructor More...
 
virtual double getFitness (const Individual *individual)
 returns the inverse fitness value what the other strategy returns for the individual "individual". More...
 
- Public Member Functions inherited from IFitnessStrategy
 IFitnessStrategy ()
 default constructor do nothing More...
 
virtual ~IFitnessStrategy ()
 default destructor do nothing More...
 

Protected Attributes

IFitnessStrategym_strategy
 The other strategy. More...
 

Detailed Description

This strategy calculate the invert to a other strategy.

This can be used for other optimization targets than zero. For example. Is the optimization target of the alg. infinity, than the inverted target is zero -> so the alg. can optimize again zero and you have you infinity target.

Constructor & Destructor Documentation

constructor Needs a other fitness strategy, which should be inverted.

Parameters
strategy(IFitnessStrategy*) the other fitness strategy

default destructor

Member Function Documentation

double getFitness ( const Individual individual)
virtual

returns the inverse fitness value what the other strategy returns for the individual "individual".

Parameters
individual(const Individual*) calculate the fitness for this individual
Returns
(double) The fitness value

Implements IFitnessStrategy.

Member Data Documentation

IFitnessStrategy* m_strategy
protected

The other strategy.


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