tmp/tmpgvzk0asf/{from.md → to.md}
RENAMED
|
@@ -7,27 +7,26 @@ $$%
|
|
| 7 |
= \binom{t}{i} \cdot p^i \cdot (1-p)^{t-i}
|
| 8 |
\; \mbox{.}$$
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
template<class IntType = int>
|
| 12 |
-
|
| 13 |
-
{
|
| 14 |
public:
|
| 15 |
// types
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
// constructors and reset functions
|
| 20 |
explicit binomial_distribution(IntType t = 1, double p = 0.5);
|
| 21 |
explicit binomial_distribution(const param_type& parm);
|
| 22 |
void reset();
|
| 23 |
|
| 24 |
// generating functions
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
// property functions
|
| 31 |
IntType t() const;
|
| 32 |
double p() const;
|
| 33 |
param_type param() const;
|
|
|
|
| 7 |
= \binom{t}{i} \cdot p^i \cdot (1-p)^{t-i}
|
| 8 |
\; \mbox{.}$$
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
template<class IntType = int>
|
| 12 |
+
class binomial_distribution {
|
|
|
|
| 13 |
public:
|
| 14 |
// types
|
| 15 |
+
using result_type = IntType;
|
| 16 |
+
using param_type = unspecified;
|
| 17 |
|
| 18 |
// constructors and reset functions
|
| 19 |
explicit binomial_distribution(IntType t = 1, double p = 0.5);
|
| 20 |
explicit binomial_distribution(const param_type& parm);
|
| 21 |
void reset();
|
| 22 |
|
| 23 |
// generating functions
|
| 24 |
+
template<class URBG>
|
| 25 |
+
result_type operator()(URBG& g);
|
| 26 |
+
template<class URBG>
|
| 27 |
+
result_type operator()(URBG& g, const param_type& parm);
|
| 28 |
|
| 29 |
// property functions
|
| 30 |
IntType t() const;
|
| 31 |
double p() const;
|
| 32 |
param_type param() const;
|