InvertedFitnessStrategy Class Reference

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

#include <InvertedFitnessStrategy.h>

Inherits IFitnessStrategy.

Collaboration diagram for InvertedFitnessStrategy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 InvertedFitnessStrategy (IFitnessStrategy *strategy)
 constructor Needs a other fitness strategy, which should be inverted.
virtual ~InvertedFitnessStrategy ()
 default destructor
virtual double getFitness (const Individual *individual)
 returns the inverse fitness value what the other strategy returns for the individual "individual".

Protected Attributes

IFitnessStrategym_strategy
 The other strategy.

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
~InvertedFitnessStrategy (  )  [virtual]

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

The other strategy.


The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:12 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3