This distribution produces random floating-point values uniformly distributed over the half-open interval [a, b).]
Declared in <absl/random/uniform_real_distribution.h>
template<typename RealType = double>
class uniform_real_distribution;
Example:
absl::BitGen gen;
// Use the distribution to produce a value between 0.0 (inclusive) // and 1.0 (exclusive). double value = absl::uniform_real_distribution<double>(0, 1)(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_real_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 real distribution. |
| Name | Description |
|---|---|
absl::operator!= | Compares two distributions for inequality. |
absl::operator== | Compares two distributions for equality. |