Export (0) Print
Expand All

binomial_distribution::param_type

Stores all the parameters of the distribution.

struct param_type {
    typedef binomial_distribution<IntType> distribution_type;
    param_type(IntType t = 1, double p = 0.5);
    IntType t() const;
    double p() const;
    .....
    bool operator==(const param_type& right) const;
    bool operator!=(const param_type& right) const;
};

Precondition: 0 ≤ t and 0.0 ≤ p ≤ 1.0

This structure can be passed to the distribution's class constructor at instantiation, to the param() member function to set the stored parameters of an existing distribution, and to operator() to be used in place of the stored parameters.

Header: <random>

Namespace: std

Show:
© 2014 Microsoft