34 #ifndef vpGaussRand_hh
35 #define vpGaussRand_hh
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)
152 void seed(
long seed_val) { m_rng.setSeed(seed_val, 0x123465789ULL); }
157 double operator()() {
return m_sigma * gaussianDraw() + m_mean; }
160 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.