This distribution produces random integer values uniformly distributed in the closed (inclusive) interval [a, b].
Declared in <absl/random/uniform_int_distribution.h>
template<typename IntType = int>
class uniform_int_distribution;
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);
| Name | Description |
|---|---|
param_type | The parameter set of the distribution. |
| Name | Description |
|---|---|
result_type | The type of the values produced by the distribution. |
| Name | Description |
|---|---|
uniform_int_distribution [constructor] | Constructors |
a | Returns the lower bound of the interval. |
b | Returns the upper bound of the interval. |
max | Returns the largest value the distribution can produce. |
min | Returns the smallest value the distribution can produce. |
operator() | Function call operators |
param | param overloads |
reset | Resets the uniform int distribution. |
| Name | Description |
|---|---|
absl::operator!= | Compares two distributions for inequality. |
absl::operator== | Compares two distributions for equality. |