#include <InvertedFitnessStrategy.h>
Inherits IFitnessStrategy.
Inheritance diagram for InvertedFitnessStrategy:


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. | |
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.
| InvertedFitnessStrategy | ( | IFitnessStrategy * | strategy | ) |
constructor Needs a other fitness strategy, which should be inverted.
| strategy | (IFitnessStrategy*) the other fitness strategy |
| ~InvertedFitnessStrategy | ( | ) | [virtual] |
default destructor
| double getFitness | ( | const Individual * | individual | ) | [virtual] |
returns the inverse fitness value what the other strategy returns for the individual "individual".
| individual | (const Individual*) calculate the fitness for this individual |
Implements IFitnessStrategy.
IFitnessStrategy* m_strategy [protected] |
The other strategy.
1.4.7