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
ValueMutationStrategy Class Reference

this mutation strategy clculate a mutation factor by using a mutation factor strategy an add this factor to the old gen. More...

#include <ValueMutationStrategy.h>

Inheritance diagram for ValueMutationStrategy:
Collaboration diagram for ValueMutationStrategy:

Public Member Functions

 ValueMutationStrategy (IMutationFactorStrategy *strategy, int mutationProbability)
 constructor More...
 
virtual ~ValueMutationStrategy ()
 default destructor More...
 
virtual Genmutate (GenContext *context, Individual *individual, Gen *oldGen, GenContext *oldContext, SingletonGenFactory *factory)
 mutate a gen More...
 
virtual int getMutationProbability (void)
 gives the Probability of a mutation back. More...
 
- Public Member Functions inherited from IMutationStrategy
 IMutationStrategy ()
 default constructor More...
 
virtual ~IMutationStrategy ()
 default destructor More...
 

Protected Attributes

IMutationFactorStrategym_strategy
 the mutation factor strategy More...
 
int m_mutationProbability
 the mutation probability More...
 

Detailed Description

this mutation strategy clculate a mutation factor by using a mutation factor strategy an add this factor to the old gen.

Constructor & Destructor Documentation

ValueMutationStrategy ( IMutationFactorStrategy strategy,
int  mutationProbability 
)

constructor

Parameters
strategy(IMutationFactorStrategy*) this strategie is used to calculate the mutation factor.
mutationProbability(int) the mutation probability which is give back.
~ValueMutationStrategy ( )
virtual

default destructor

Member Function Documentation

int getMutationProbability ( void  )
virtual

gives the Probability of a mutation back.

Returns

Implements IMutationStrategy.

Gen * mutate ( GenContext context,
Individual individual,
Gen oldGen,
GenContext oldContext,
SingletonGenFactory factory 
)
virtual

mutate a gen

Parameters
context(GenContext*) the context in which the new gen comes (needed by the factory
individual(Individual*) the individual, which the new gen becomes
oldGen(Gen*) the old gen, which mutate
oldContext(GenContext*) the Context in which the old gen are.
factory(SingletonGenFactory*) the GenFactory which create the new gen.
Returns
(Gen*) the new mutated gen

Implements IMutationStrategy.

Member Data Documentation

int m_mutationProbability
protected

the mutation probability

IMutationFactorStrategy* m_strategy
protected

the mutation factor strategy


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