Produces a floating point value from a Beta distribution.
Synopsis
Declared in <absl/random/distributions.h>
template<
typename RealType,
typename URBG>
RealType
Beta(
URBG&& urbg,
RealType alpha,
RealType beta);
Description
absl::Beta produces a floating point number distributed in the closed interval [0,1]and parameterized by two values alpha and beta as per a Beta distribution. T must be a floating point type, but may be inferred from the types of alpha and beta.
See https://en.wikipedia.org/wiki/Beta_distribution.
Example:
absl::BitGen bitgen; ... double sample = absl::Beta(bitgen, 3.0, 2.0);
Return Value
A random value in [0, 1]drawn from the Beta distribution.
Parameters
Name |
Description |
urbg |
The uniform random bit generator. |
alpha |
The first shape parameter of the distribution. |
beta |
The second shape parameter of the distribution. |
Created with MrDocs