31 : rd_(), eng_(rd_()), distr_(mean, standardDeviation)
46 template <
size_t size>
47 Eigen::Matrix<double, size, 1>
gen()
49 Eigen::Matrix<double, size, 1> noise;
51 for (
size_t i = 0;
i < size;
i++)
53 noise(
i) = distr_(eng_);
66 template <
size_t size>
67 void noisify(Eigen::Matrix<double, size, 1>& value)
69 value += this->gen<size>();
74 std::random_device rd_;
76 std::normal_distribution<> distr_;
void noisify(Eigen::Matrix< double, size, 1 > &value)
adds Gaussian noise to a vector
Definition: GaussianNoise.h:67
Gaussian noise generator.
Definition: GaussianNoise.h:22
Eigen::Matrix< double, size, 1 > gen()
Vector generator.
Definition: GaussianNoise.h:47
GaussianNoise(double mean=0.0, double standardDeviation=1.0)
Standard constructor.
Definition: GaussianNoise.h:30
void noisify(double &value)
adds Gaussian noise to a single scalar variable
Definition: GaussianNoise.h:60
double operator()()
Scalar generator.
Definition: GaussianNoise.h:40