[rand.dist.uni.int] (original) (raw)
26 Numerics library [numerics]
26.6 Random number generation [rand]
26.6.8 Random number distribution class templates [rand.dist]
26.6.8.2 Uniform distributions [rand.dist.uni]
26.6.8.2.1 Class template uniform_int_distribution [rand.dist.uni.int]
A uniform_int_distribution random number distribution produces random integers i,, distributed according to the constant discrete probability function
template class uniform_int_distribution { public:
using result_type = IntType;
using param_type = unspecified;
uniform_int_distribution() : uniform_int_distribution(0) {}
explicit uniform_int_distribution(IntType a, IntType b = numeric_limits<IntType>::max());
explicit uniform_int_distribution(const param_type& parm);
void reset();
template<class URBG>
result_type operator()(URBG& g);
template<class URBG>
result_type operator()(URBG& g, const param_type& parm);
result_type a() const;
result_type b() const;
param_type param() const;
void param(const param_type& parm);
result_type min() const;
result_type max() const;};
explicit uniform_int_distribution(IntType a, IntType b = numeric_limits<IntType>::max());
Remarks: a and b correspond to the respective parameters of the distribution.
Returns:The value of the a parameter with which the object was constructed.
Returns:The value of the b parameter with which the object was constructed.