std::experimental::ranges::UniformRandomNumberGenerator
From cppreference.com
< cpp | experimental | ranges
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
Ranges
Concepts library
| Core language concepts | |||||
| Object concepts | |||||
| Comparison concepts | |||||
| Callable concepts | |||||
| URNG concept | |||||
| |||||
| Defined in header <experimental/ranges/random>
|
||
| template< class G > concept bool UniformRandomNumberGenerator = |
(ranges TS) | |
The concept UniformRandomNumberGenerator<G> specifies that G is the type of a uniform random number 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.
UniformRandomNumberGenerator<G> is satisfied only if, given any object g of type G:
-
G::min()andG::max()are prvalue constant expressions; -
G::min() < G::max() -
g()is in the range[G::min(), G::max()] -
g()has amortized constant complexity.