NoiseGenerator Class Reference

Interface and basic class for noise generator. More...

#include <noisegenerator.h>

Inherited by ColorUniformNoise, NoNoise, SineWhiteNoise, WhiteNormalNoise, and WhiteUniformNoise.

Inheritance diagram for NoiseGenerator:

Inheritance graph
[legend]
Collaboration diagram for NoiseGenerator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NoiseGenerator ()
virtual ~NoiseGenerator ()
virtual void init (unsigned int dimension, RandGen *randGen=0)
 initialization with the the given dimension for multidimensional noise
virtual double generate ()=0
 generate somehow distributed random number parameterized with min and max.
virtual void add (double *value, double noiseStrength)
 adds multidimensional noise to the value field.

Protected Member Functions

double uniform (double min=-0.1, double max=0.1)
double uniform01 ()

Protected Attributes

unsigned int dimension
RandGenrandGen
bool ownRandGen

Detailed Description

Interface and basic class for noise generator.

It is suitable for single noise channels but also multidimensional noise.


Constructor & Destructor Documentation

NoiseGenerator (  )  [inline]

virtual ~NoiseGenerator (  )  [inline, virtual]


Member Function Documentation

virtual void add ( double *  value,
double  noiseStrength 
) [inline, virtual]

adds multidimensional noise to the value field.

Generic implementation calls generate for each channel. Overload this if you need different behavior.

Parameters:
value field where noise is added. Must have length dimension (init())

Reimplemented in ColorUniformNoise, ColorNormalNoise, and SineWhiteNoise.

virtual double generate (  )  [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 NoNoise, WhiteUniformNoise, WhiteNormalNoise, ColorUniformNoise, ColorNormalNoise, and SineWhiteNoise.

virtual void init ( unsigned int  dimension,
RandGen randGen = 0 
) [inline, virtual]

initialization with the the given dimension for multidimensional noise

Parameters:
dimension dimensionality of vectors to be used by add
randGen pointer to a random generator. If zero a new one generated internally
See also:
add()

Reimplemented in ColorUniformNoise, and ColorNormalNoise.

double uniform ( double  min = -0.1,
double  max = 0.1 
) [inline, protected]

double uniform01 (  )  [inline, protected]


Member Data Documentation

unsigned int dimension [protected]

bool ownRandGen [protected]

RandGen* randGen [protected]


The documentation for this class was generated from the following file:
Generated on Fri Oct 30 16:29:02 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7