absl::discrete_distribution::discrete_distribution

Constructs a distribution from a list of weights.

Synopsis

Declared in <absl/random/discrete_distribution.h>

explicit
discrete_distribution(std::initializer_list<double> weights);

Parameters

NameDescription
weightsThe weights of the possible outcomes.