39 #ifndef vpGaussRand_hh 40 #define vpGaussRand_hh 42 #include <visp3/core/vpConfig.h> 43 #include <visp3/core/vpUniRand.h> 123 double gaussianDraw();
135 vpGaussRand() : m_rng(), m_mean(0), m_sigma(0), m_AlreadyDone(false), m_x2(0) {}
144 vpGaussRand(
double sigma_val,
double mean_val,
long noise_seed = 0)
145 : m_rng(noise_seed), m_mean(mean_val), m_sigma(sigma_val), m_AlreadyDone(false), m_x2(0)
166 void seed(
long seed_val) { m_rng.
setSeed(seed_val, 0x123465789ULL); }
171 double operator()() {
return m_sigma * gaussianDraw() + m_mean; }
void setSeed(uint64_t initstate, uint64_t initseq)
void setSigmaMean(double sigma_val, double mean_val)
vpGaussRand(double sigma_val, double mean_val, long noise_seed=0)
Class for generating random number with normal probability density.
Class for generating random numbers with uniform probability density.