binomial_distribution Class
Generates a binomial distribution.
template<class IntType = int, class RealType = double>
class binomial_distribution {
public:
typedef /* implementation defined */ input_type;
typedef IntType result_type;
explicit binomial_distribution(result_type t0 = 1,
const RealType& p0 = RealType(0.5));
result_type t() const;
RealType p() const;
void reset();
template<class Engine>
result_type operator()(Engine& eng);
private:
const result_type stored_t; // exposition only
const RealType stored_p; // exposition only
};
Parameters
IntType
The integer result type.RealType
The floating-point engine value type.
Remarks
The template class decribes a distribution that produces values of a user-specified integral type distributed with a binomial distribution.
Requirements
Header: <random>
Namespace: std::tr1