This distribution produces random floating‐point values uniformly distributed over the half‐open interval [a, b).]
Synopsis
Declared in <absl/random/uniform_real_distribution.h>
template<typename RealType = double>
class uniform_real_distribution;
Description
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);
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 real distribution. |
Friends
Name |
Description |
Compares two distributions for inequality. |
|
Compares two distributions for equality. |
Created with MrDocs