24 #ifndef __NOISEGENERATOR_H
25 #define __NOISEGENERATOR_H
85 virtual void add(
double *value,
double noiseStrength){
86 for (
unsigned int i = 0; i <
dimension; i++){
148 return( (sqrt(-2*log(x1)) *cos(2*M_PI*x2)));
175 for (
unsigned int i=0; i<
dimension; i++){
182 return(mean1channel);
190 virtual void add(
double *value,
double noiseStrength){
191 for (
unsigned int i = 0; i <
dimension; i++){
199 if(newTau >=0 && newTau <= 1){
227 for (
unsigned int i=0; i<
dimension; i++){
234 return(mean1channel);
237 virtual void add(
double *value,
double noiseStrength) {
238 for (
unsigned int i = 0; i <
dimension; i++){
246 if(newTau >=0 && newTau <= 1){
270 : omega(omega), amplitude(amplitude)
285 virtual void add(
double *value,
double noiseStrength) {
287 for (
unsigned int i = 0; i <
dimension; i++){
292 value[i]+=
uniform(-1, 1)*noiseStrength;
unsigned int channels
Definition: noisegenerator.h:308
RandGen * randGen
Definition: noisegenerator.h:113
double amplitude
Definition: noisegenerator.h:307
generates no noise
Definition: noisegenerator.h:118
virtual void setTau(double newTau)
Definition: noisegenerator.h:245
void setOmega(double omega)
Definition: noisegenerator.h:297
double rand()
returns a value in [0,1)
Definition: randomgenerator.h:42
virtual void add(double *value, double noiseStrength)
adds multidimensional noise to the value field.
Definition: noisegenerator.h:85
virtual ~WhiteNormalNoise()
Definition: noisegenerator.h:144
WhiteNormalNoise()
Definition: noisegenerator.h:143
bool ownRandGen
Definition: noisegenerator.h:114
virtual double generate()
generate somehow distributed random number parameterized with min and max.
Definition: noisegenerator.h:277
virtual void setDimension(unsigned int dim)
Definition: noisegenerator.h:95
like ColorUniformNoise but averaging over normal distributed noise instead.
Definition: noisegenerator.h:213
unsigned int dimension
Definition: noisegenerator.h:112
virtual ~ColorNormalNoise()
Definition: noisegenerator.h:222
virtual void add(double *value, double noiseStrength)
adds multidimensional noise to the value field.
Definition: noisegenerator.h:237
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
double sqrttau
Definition: noisegenerator.h:254
virtual void add(double *value, double noiseStrength)
adds multidimensional noise to the value field.
Definition: noisegenerator.h:285
struct _RandGen RandGen
random generator with 48bit integer arithmentic
long int t
Definition: noisegenerator.h:305
double omega
Definition: noisegenerator.h:306
NoNoise()
Definition: noisegenerator.h:120
virtual double generate()
generate somehow distributed random number parameterized with min and max.
Definition: noisegenerator.h:122
void init(long int seedval)
Definition: randomgenerator.h:38
virtual ~NoNoise()
Definition: noisegenerator.h:121
virtual unsigned int getDimension() const
Definition: noisegenerator.h:91
ColorNormalNoise(double tau=0.05)
Definition: noisegenerator.h:215
double phaseShift
Definition: noisegenerator.h:309
double max(const matrix::Matrix &v)
returns the largest element
Definition: controller_misc.cpp:318
virtual ~NoiseGenerator()
Definition: noisegenerator.h:46
virtual void init(unsigned int dimension, RandGen *randGen=0)
initialization with the the given dimension for multidimensional noise
Definition: noisegenerator.h:61
virtual ~SineWhiteNoise()
Definition: noisegenerator.h:275
void setPhaseShift(double phaseShift)
Definition: noisegenerator.h:300
virtual double generate()
generate somehow distributed random number parameterized with min and max.
Definition: noisegenerator.h:232
virtual double generate()
generate somehow distributed random number parameterized with min and max.
Definition: noisegenerator.h:145
double uniform(double min=-0.1, double max=0.1)
Definition: noisegenerator.h:103
double * mean
Definition: noisegenerator.h:255
NoiseGenerator()
Definition: noisegenerator.h:39
double factor
Definition: noisegenerator.h:257
double tau
Definition: noisegenerator.h:253
double uniform01()
Definition: noisegenerator.h:108
virtual void init(unsigned int dimension, RandGen *randGen=0)
initialization with the the given dimension for multidimensional noise
Definition: noisegenerator.h:224
SineWhiteNoise(double omega, double amplitude, double phaseShift=M_PI/2, unsigned int channels=0xFFFF)
Definition: noisegenerator.h:268
generates white and normal distributed random numbers.
Definition: noisegenerator.h:141
double min(const matrix::Matrix &v)
returns the smallest element
Definition: controller_misc.cpp:307
virtual double getTau()
Definition: noisegenerator.h:244
Sine wave noise. Produces a 90 degree phase shifted sine wave or white noise.
Definition: noisegenerator.h:261
double mean1channel
Definition: noisegenerator.h:256
virtual double generate()=0
generate somehow distributed random number parameterized with min and max.
Interface and basic class for noise generator.
Definition: noisegenerator.h:37