Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
This class create a IValue (TemplateValue with type double) and initialize it with an random double value. More...
#include <DoubleRandomStrategy.h>
Public Member Functions | |
DoubleRandomStrategy (RandGen *random, double base=0.0, double factor=1.0, double epsilon=0.0) | |
The constructor. More... | |
virtual | ~DoubleRandomStrategy () |
default destructor More... | |
virtual IValue * | getRandomValue (void) |
implementation for the interface. More... | |
Public Member Functions inherited from IRandomStrategy | |
IRandomStrategy () | |
default constructor More... | |
virtual | ~IRandomStrategy () |
default destructor More... | |
Protected Attributes | |
RandGen * | m_random |
the random generator More... | |
double | m_base |
base parameter. More... | |
double | m_factor |
factor parameter. More... | |
double | m_epsilon |
epsilon parameter. More... | |
This class create a IValue (TemplateValue with type double) and initialize it with an random double value.
The value have basically a math. range from zero to one. With the parameter factor you can change it to zero to factor. With the parameter base you can move the interval. With the last parameter you can defied the interval by zero and move away from zero.
DoubleRandomStrategy | ( | RandGen * | random, |
double | base = 0.0 , |
||
double | factor = 1.0 , |
||
double | epsilon = 0.0 |
||
) |
The constructor.
It becomes the 3 parameters which the class need to generate double value in a special range.
random | (RandGen*) random generator which create double values in the range zero to one. |
base | (double) A parameter for the alg. it move a random value. |
factor | (double) A parameter which resize the interval of the random values. |
epsilon | (double) A parameter which dified the interval of the random values. |
|
virtual |
default destructor
|
virtual |
implementation for the interface.
It create the random double value and give it as a IValue back (TemplateValue with type double)
Implements IRandomStrategy.
|
protected |
base parameter.
moves the random value interval.
|
protected |
epsilon parameter.
dified the random value interval by zero and move it away.
|
protected |
factor parameter.
resize the random value interval.
|
protected |
the random generator