Namespaces
Variants
Views
Actions

std::binomial_distribution::binomial_distribution

From cppreference.com
< cpp‎ | numeric‎ | random‎ | binomial distribution
Revision as of 20:59, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
 
 

Template:ddcl list begin <tr class="t-dcl ">

<td >
explicit binomial_distribution( IntType t = 1, double p = 0.5 );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
explicit binomial_distribution( const param_type& params );
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

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

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

Notes

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