34 #ifndef VP_GAUSSRAND_H
35 #define VP_GAUSSRAND_H
37 #include <visp3/core/vpConfig.h>
38 #include <visp3/core/vpUniRand.h>
122 vpGaussRand() : m_rng(), m_mean(0), m_sigma(0), m_AlreadyDone(false), m_x2(0) { }
131 vpGaussRand(
double sigma_val,
double mean_val,
long noise_seed = 0)
132 : m_rng(noise_seed), m_mean(mean_val), m_sigma(sigma_val), m_AlreadyDone(false), m_x2(0)
153 const unsigned long long val_ull = 0x123465789ULL;
154 m_rng.setSeed(seed_val, val_ull);
160 double operator()() {
return (m_sigma * gaussianDraw()) + m_mean; }
163 double gaussianDraw();
Class for generating random number with normal probability density.
void setSigmaMean(double sigma_val, double mean_val)
vpGaussRand(double sigma_val, double mean_val, long noise_seed=0)
Class for generating random numbers with uniform probability density.