InvertedFitnessStrategy Class Reference

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

#include <InvertedFitnessStrategy.h>

Inherits IFitnessStrategy.

Inheritance diagram for InvertedFitnessStrategy:

Inheritance graph
[legend]
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

InvertedFitnessStrategy ( IFitnessStrategy strategy  ) 

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

IFitnessStrategy* m_strategy [protected]

The other strategy.


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:02 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7