This distribution produces random integer values uniformly distributed in the closed (inclusive) interval [a, b].
Synopsis
Declared in <absl/random/uniform_int_distribution.h>
template<typename IntType = int>
class uniform_int_distribution;
Description
Example:
absl::BitGen gen;
// Use the distribution to produce a value between 1 and 6, inclusive. int die_roll = absl::uniform_int_distribution<int>(1, 6)(gen);
Types
Name |
Description |
The parameter set of the distribution. |
Type Aliases
Name |
Description |
The type of the values produced by the distribution. |
Member Functions
Name |
Description |
|
Constructors |
Returns the lower bound of the interval. |
|
Returns the upper bound of the interval. |
|
Returns the largest value the distribution can produce. |
|
Returns the smallest value the distribution can produce. |
|
Function call operators |
|
|
|
Resets the uniform int distribution. |
Friends
Name |
Description |
Compares two distributions for inequality. |
|
Compares two distributions for equality. |
Created with MrDocs