A uniform random bit generator is a function object returning unsigned integer values such that each value in the range of possible results has (ideally) equal probability.
Uniform random bit generators are not intended to be used as random number generators: they are used as the source of random bits (generated in bulk, for efficiency). Any uniform random bit generator may be plugged into any random number distribution in order to obtain a random number (formally, a random variate).
T, the type named by
g, a value of type
The following expressions must be valid and have their specified effects
T is an unsigned integer type
| Returns the smallest value that G's operator() may return. The value is strictly less than |
| Returns the largest value that G's operator() may return. The value is strictly greater than |
| Returns a value in the closed interval [G::min(), G::max()]. Has amortized constant complexity.
RandomNumberEngines satisfy this concept.
The following standard library facilities expect a
|| randomly re-orders elements in a range |
|| evenly distributes real values of given precision across [0, 1) |
|| produces integer values evenly distributed across a range |
|| produces real values evenly distributed across a range |
| all other random number distributions
The following standard library facilities satisfy
UniformRandomBitGenerator without additionally satisfying
|| non-deterministic random number generator using hardware entropy source |