Robot Simulator of the Robotics Group for Self-Organization of Control: InvertedFitnessStrategy Class Reference

# InvertedFitnessStrategy Class Reference

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

`#include <InvertedFitnessStrategy.h>`

Inherits IFitnessStrategy.

Collaboration diagram for InvertedFitnessStrategy:
[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
IFitnessStrategy * | m_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:

- InvertedFitnessStrategy.h
- InvertedFitnessStrategy.cpp