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).
[edit] RequirementsThe type G
satisfies UniformRandomBitGenerator if
Given g, a value of type G
, all following conditions are satisfied:
G::result_type
is valid, and denotes an unsigned integer type.G::result_type
G
's operator() may return. G::result_type
G
's operator() may return.G::min()
.G::result_type
[
G::min(),
G::max()]
.All RandomNumberEngines satisfy this requirement.
[edit] Standard libraryThe following standard library facilities expect a UniformRandomBitGenerator type.
The following standard library facilities satisfy UniformRandomBitGenerator without additionally satisfying RandomNumberEngine:
non-deterministic random number generator using hardware entropy sourceThe following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior LWG 2154RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4