From Jason Turner

[rand.dist.pois.poisson]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpae64xly3/{from.md → to.md} +7 -11
tmp/tmpae64xly3/{from.md → to.md} RENAMED
@@ -1,15 +1,11 @@
1
  ##### Class template `poisson_distribution` <a id="rand.dist.pois.poisson">[[rand.dist.pois.poisson]]</a>
2
 
3
  A `poisson_distribution` random number distribution produces integer
4
  values i ≥ 0 distributed according to the discrete probability function
5
- $$%
6
- P(i\,|\,\mu)
7
- = \frac{ e^{-\mu} \mu^{i} }
8
- { i\,! }
9
- \; \mbox{.}$$ The distribution parameter μ is also known as this
10
- distribution’s *mean* .
11
 
12
  ``` cpp
13
  template<class IntType = int>
14
  class poisson_distribution
15
  {
@@ -17,11 +13,12 @@ template<class IntType = int>
17
  // types
18
  using result_type = IntType;
19
  using param_type = unspecified;
20
 
21
  // constructors and reset functions
22
- explicit poisson_distribution(double mean = 1.0);
 
23
  explicit poisson_distribution(const param_type& parm);
24
  void reset();
25
 
26
  // generating functions
27
  template<class URBG>
@@ -37,17 +34,16 @@ template<class IntType = int>
37
  result_type max() const;
38
  };
39
  ```
40
 
41
  ``` cpp
42
- explicit poisson_distribution(double mean = 1.0);
43
  ```
44
 
45
- *Requires:* 0 < `mean`.
46
 
47
- *Effects:* Constructs a `poisson_distribution` object; `mean`
48
- corresponds to the parameter of the distribution.
49
 
50
  ``` cpp
51
  double mean() const;
52
  ```
53
 
 
1
  ##### Class template `poisson_distribution` <a id="rand.dist.pois.poisson">[[rand.dist.pois.poisson]]</a>
2
 
3
  A `poisson_distribution` random number distribution produces integer
4
  values i ≥ 0 distributed according to the discrete probability function
5
+ $$P(i\,|\,\mu) = \frac{e^{-\mu} \mu^{i}}{i\,!} \text{ .}$$ The
6
+ distribution parameter μ is also known as this distribution’s *mean* .
 
 
 
 
7
 
8
  ``` cpp
9
  template<class IntType = int>
10
  class poisson_distribution
11
  {
 
13
  // types
14
  using result_type = IntType;
15
  using param_type = unspecified;
16
 
17
  // constructors and reset functions
18
+ poisson_distribution() : poisson_distribution(1.0) {}
19
+ explicit poisson_distribution(double mean);
20
  explicit poisson_distribution(const param_type& parm);
21
  void reset();
22
 
23
  // generating functions
24
  template<class URBG>
 
34
  result_type max() const;
35
  };
36
  ```
37
 
38
  ``` cpp
39
+ explicit poisson_distribution(double mean);
40
  ```
41
 
42
+ *Preconditions:* 0 < `mean`.
43
 
44
+ *Remarks:* `mean` corresponds to the parameter of the distribution.
 
45
 
46
  ``` cpp
47
  double mean() const;
48
  ```
49