discrete_distribution::operator()
Returns a random value.
template<class Engine>
result_type operator()(Engine& eng);
template<class Engine>
result_type operator()(Engine& eng,
const param_type& par0);
Parameters
eng
The random engine.par0
The parameter package used to return the random value.
Remarks
The first member operator uses the engine eng as a source of uniformly distributed random integral values and returns integral values with each value i in the range [0, stored_p.size() - 1) occurring with probability stored_p[i] and all other values of i occurring with probability zero.
The second member function behaves the same, except that it uses the parameters stored in par0.
Requirements
Header: <random>
Namespace: std