[#absl-Beta]
= xref:absl.adoc[absl]::Beta
:relfileprefix: ../
:mrdocs:

Produces a floating point value from a Beta distribution&period;

== Synopsis

Declared in `&lt;absl&sol;random&sol;distributions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename RealType,
    typename URBG&gt;
RealType
Beta(
    URBG&& urbg,
    RealType alpha,
    RealType beta);
----

== Description

`absl&colon;&colon;Beta` produces a floating point number distributed in the closed interval &lsqb;0,1&rsqb;and parameterized by two values `alpha` and `beta` as per a Beta distribution&period; `T` must be a floating point type, but may be inferred from the types of `alpha` and `beta`&period;

See https&colon;&sol;&sol;en&period;wikipedia&period;org&sol;wiki&sol;Beta&lowbar;distribution&period;

Example&colon;

absl&colon;&colon;BitGen bitgen&semi; &period;&period;&period; double sample &equals; absl&colon;&colon;Beta(bitgen, 3&period;0, 2&period;0)&semi;

== Return Value

A random value in &lsqb;0, 1&rsqb;drawn from the Beta distribution&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *urbg*
| The uniform random bit generator&period;
| *alpha*
| The first shape parameter of the distribution&period;
| *beta*
| The second shape parameter of the distribution&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
