Difference between revisions of "cpp/numeric/random/bernoulli distribution"
From cppreference.com
(fmt) |
(place that space here) |
||
Line 7: | Line 7: | ||
Produces random boolean values, according to the discrete probability function. The probability of {{cpp|true}} is | Produces random boolean values, according to the discrete probability function. The probability of {{cpp|true}} is | ||
− | :{{math|P(b{{!}}p) {{=}}}}{{mparen|{||{{math|p}} if {{cpp| | + | :{{math|P(b{{!}}p) {{=}}}}{{mparen|{||{{math|p}} if {{cpp|b {{==}} true }} | {{math|1 − p}} if {{cpp|b {{==}} false}}|style=text-align:right}} |
===Member types=== | ===Member types=== |
Revision as of 08:29, 21 January 2012
Template:cpp/numeric/random/bernoulli distribution/sidebar
Defined in header <random>
|
||
class bernoulli_distribution; |
(since C++11) | |
Produces random boolean values, according to the discrete probability function. The probability of Template:cpp is
- P(b|p) =⎧
⎨
⎩p if Template:cpp
1 − p if Template:cpp
Contents |
Member types
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list end