absl::discrete_distribution::discrete_distribution

Constructs a distribution from a range of weights.

Synopsis

Declared in <absl/random/discrete_distribution.h>

template<typename InputIterator>
explicit
discrete_distribution(
    InputIterator begin,
    InputIterator end);

Parameters

NameDescription
beginAn iterator to the first weight.
endAn iterator past the last weight.