std:: uniform_random_bit_generator
Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data-parallel types (
simd
)
(C++26)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Saturation arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bit operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
Defined in header
<random>
|
||
template
<
class
G
>
concept uniform_random_bit_generator
=
|
(since C++20) | |
The concept
uniform_random_bit_generator<G>
specifies that
G
is the type of a uniform random bit generator, that is, objects of type
G
is a function object returning unsigned integer values such that each value in the range of possible results has (ideally) equal probability of being returned.
Semantic requirements
uniform_random_bit_generator<G>
is modeled only if, given any object
g
of type
G
:
-
g()
is in the range[
G :: min ( ),
G :: max ( )]
, -
g()
has amortized constant complexity.
Notes
In order to satisfy the requirement std:: bool_constant < ( G :: min ( ) < G :: max ( ) ) > :: value , both G :: min ( ) and G :: max ( ) must be constant expressions, and the result of the comparison must be true .