Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
Interface and basic class for noise generator. More...
#include <noisegenerator.h>
Public Member Functions | |
NoiseGenerator () | |
virtual | ~NoiseGenerator () |
virtual void | init (unsigned int dimension, RandGen *randGen=0) |
initialization with the the given dimension for multidimensional noise More... | |
virtual double | generate ()=0 |
generate somehow distributed random number parameterized with min and max. More... | |
virtual void | add (double *value, double noiseStrength) |
adds multidimensional noise to the value field. More... | |
virtual unsigned int | getDimension () const |
virtual void | setDimension (unsigned int dim) |
Protected Member Functions | |
double | uniform (double min=-0.1, double max=0.1) |
double | uniform01 () |
Protected Attributes | |
unsigned int | dimension |
RandGen * | randGen |
bool | ownRandGen |
Interface and basic class for noise generator.
It is suitable for single noise channels but also multidimensional noise.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
adds multidimensional noise to the value field.
Generic implementation calls generate for each channel. Overload this if you need different behavior.
value | field where noise is added. Must have length dimension (init()) |
Reimplemented in SineWhiteNoise, ColorNormalNoise, and ColorUniformNoise.
|
pure virtual |
generate somehow distributed random number parameterized with min and max.
valid only for ONE random number, use add() for adding this kind of noise to several channels
Implemented in SineWhiteNoise, ColorNormalNoise, ColorUniformNoise, WhiteNormalNoise, WhiteUniformNoise, and NoNoise.
|
inlinevirtual |
|
inlinevirtual |
initialization with the the given dimension for multidimensional noise
dimension | dimensionality of vectors to be used by add |
randGen | pointer to a random generator. If zero a new one generated internally |
Reimplemented in ColorNormalNoise, and ColorUniformNoise.
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
protected |