std::binomial_distribution::binomial_distribution - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::binomial_distribution::binomial_distribution

From cppreference.com
< cpp‎ | numeric‎ | random‎ | binomial distribution

explicit binomial_distribution( IntType t = 1, double p = 0.5 ); | (1) | (since C++11)
explicit binomial_distribution( const param_type& params ); | (2) | (since C++11)

Constructs new distribution object. The first version uses `t` and `p` as the distribution parameters, the second version uses `params` as the distribution parameters.

### [edit] Parameters

t | - | the t distribution parameter (number of trials)
p | - | the p distribution parameter (probability of a trial generating true)
params | - | the distribution parameter set

### [edit] Notes

Requires that 0 ≤ p ≤ 1 and 0 ≤ t.

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/random/binomial_distribution/binomial_distribution&oldid=62889"