- 3.0.2 core module.
|
Gaussian noise generator. More...
#include <GaussianNoise.h>
Public Member Functions | |
GaussianNoise (double mean=0.0, double standardDeviation=1.0) | |
Standard constructor. More... | |
double | operator() () |
Scalar generator. More... | |
template<size_t size> | |
Eigen::Matrix< double, size, 1 > | gen () |
Vector generator. More... | |
void | noisify (double &value) |
adds Gaussian noise to a single scalar variable More... | |
template<size_t size> | |
void | noisify (Eigen::Matrix< double, size, 1 > &value) |
adds Gaussian noise to a vector More... | |
Gaussian noise generator.
This class generates random Gaussian noise given a mean and a distribution. It can either create a single (pseudo) random variable or an entire vector.
Unit test NoiseTest.cpp illustrates the use of GaussianNoise
|
inline |
Standard constructor.
mean | the mean of the Gaussian distribution |
standardDeviation | the standard deviation of the distribution |
|
inline |
Scalar generator.
generates a single scalar random variable
Referenced by noisify().
|
inline |
Vector generator.
All entries in the vector are separately generated random variables
References i.
|
inline |
adds Gaussian noise to a single scalar variable
References operator()().
|
inline |
adds Gaussian noise to a vector
Different random variables are used to perturb each entry of the vector
value | the vector to perturb |