5 #include "vnl/vnl_export.h" 80 template <
class I,
class T>
88 template <
class I,
class T>
95 #endif // vnl_sample_h_ VNL_EXPORT int vnl_sample_binomial(int n, double q)
Return random k, where P(X = k) = [kth term in binomial expansion of (q + (1-q))^n].
VNL_EXPORT void vnl_sample_normal_2(double *x, double *y)
two independent samples from a standard normal distribution.
VNL_EXPORT double vnl_sample_uniform01()
return a random number uniformly drawn on [0, 1.0).
VNL_EXPORT double vnl_sample_uniform(double a, double b)
return a random number uniformly drawn on [a, b).
VNL_EXPORT double vnl_sample_normal(double mean, double sigma)
Normal distribution with given mean and standard deviation.
VNL_EXPORT void vnl_sample_reseed()
re-seed the random number generator.
iterator end()
Iterator pointing to element beyond end of data.
VNL_EXPORT int vnl_sample_bernoulli(double q)
Bernoulli distribution ("coin toss").
T mean() const
Return mean of all matrix elements.
iterator begin()
Iterator pointing to start of data.