absl::bernoulli_distribution::operator()

Function call operators

Synopses

Declared in <absl/random/bernoulli_distribution.h>

Generates a random boolean value.

template<typename URBG>
bool
operator()(URBG& g);
» more...

Generates a random boolean value using the given parameter set.

template<typename URBG>
bool
operator()(
    URBG& g,
    param_type const& param);
» more...

Return Value

A random boolean value.

Parameters

NameDescription
gThe uniform random bit generator.
paramThe parameter set to use for this call.