10 #if !defined(EXRANDOM_RAND_DIGIT_HPP) 11 #define EXRANDOM_RAND_DIGIT_HPP 1 20 # pragma warning (push) 21 # pragma warning (disable: 4127) 65 template<
typename Generator>
69 Generator::min() == 0UL &&
70 Generator::max() == 0xffffffffUL )
72 return uint_t(g() >> (32 -
bits));
74 Generator::min() == 0UL &&
75 Generator::max() == 0xffffffffffffffffULL )
77 return uint_t((g() & 0xffffffffUL) >> (32 -
bits));
87 long long count()
const {
return _count; }
92 template<
typename RealType>
98 typedef std::uniform_int_distribution<uint_t> uint_random_t;
105 #if defined(_MSC_VER) 106 # pragma warning (pop) 109 #endif // EXRANDOM_RAND_DIGIT_HPP Machinery to manipulate bases.
Definition of digit_arithmetic.
Machinery to convert a random generator into a random digit.
uint_t operator()(Generator &g)
static RealType invrealbase()
static const uint_t max_value
static const bool power_of_two
static const uint_t min_value