[#absl-Uniform-08] = xref:absl.adoc[absl]::Uniform :relfileprefix: ../ :mrdocs: `Uniform` overloads == Synopses Declared in `<absl/random/distributions.h>` Produces random values across the full range of an unsigned type. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename R, typename URBG> R xref:absl/Uniform-02.adoc[Uniform](URBG&& urbg) requires !std::numeric_limits<R>::is_signed; ---- [.small]#xref:absl/Uniform-02.adoc[_» more..._]# Produces random values of type `T` uniformly distributed in [lo, hi).] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename R = void, typename URBG> R xref:absl/Uniform-0e9.adoc[Uniform]( URBG&& urbg, R lo, R hi) requires !std::is_same_v<R, void>; ---- [.small]#xref:absl/Uniform-0e9.adoc[_» more..._]# Produces random values in [lo, hi) with an inferred return type.] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename R = void, typename URBG, typename A, typename B> /* implementation-defined */::uniform_inferred_return_t<A, B> xref:absl/Uniform-00.adoc[Uniform]( URBG&& urbg, A lo, B hi) requires std::is_same_v<R, void>; ---- [.small]#xref:absl/Uniform-00.adoc[_» more..._]# Produces random values of type `T` uniformly distributed in an interval. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename R = void, typename TagType, typename URBG> R xref:absl/Uniform-0e2.adoc[Uniform]( TagType tag, URBG&& urbg, R lo, R hi) requires !std::is_same_v<R, void>; ---- [.small]#xref:absl/Uniform-0e2.adoc[_» more..._]# Produces random values with an interval tag and inferred return type. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename R = void, typename TagType, typename URBG, typename A, typename B> /* implementation-defined */::uniform_inferred_return_t<A, B> xref:absl/Uniform-0c.adoc[Uniform]( TagType tag, URBG&& urbg, A lo, B hi) requires std::is_same_v<R, void>; ---- [.small]#xref:absl/Uniform-0c.adoc[_» more..._]# == 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 [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#