Uniform overloads
Synopses
Declared in <absl/random/distributions.h>
Produces random values across the full range of an unsigned type.
template<
typename R,
typename URBG>
R
Uniform(URBG&& urbg)
requires !std::numeric_limits<R>::is_signed;
Produces random values of type T uniformly distributed in [lo, hi).]
template<
typename R = void,
typename URBG>
R
Uniform(
URBG&& urbg,
R lo,
R hi)
requires !std::is_same_v<R, void>;
Produces random values in [lo, hi) with an inferred return type.]
template<
typename R = void,
typename URBG,
typename A,
typename B>
/* implementation-defined */::uniform_inferred_return_t<A, B>
Uniform(
URBG&& urbg,
A lo,
B hi)
requires std::is_same_v<R, void>;
Produces random values of type T uniformly distributed in an interval.
template<
typename R = void,
typename TagType,
typename URBG>
R
Uniform(
TagType tag,
URBG&& urbg,
R lo,
R hi)
requires !std::is_same_v<R, void>;
Produces random values with an interval tag and inferred return type.
template<
typename R = void,
typename TagType,
typename URBG,
typename A,
typename B>
/* implementation-defined */::uniform_inferred_return_t<A, B>
Uniform(
TagType tag,
URBG&& urbg,
A lo,
B hi)
requires std::is_same_v<R, void>;
Return Value
-
A random value uniformly distributed across the range of
R. -
A random value uniformly distributed in [lo, hi).]
-
A random value uniformly distributed in the interval.
Parameters
Name |
Description |
urbg |
The uniform random bit generator. |
lo |
The inclusive lower bound of the interval. |
hi |
The exclusive upper bound of the interval. |
tag |
The interval tag selecting which endpoints are included. |
Created with MrDocs