From Jason Turner

[rand.dist.pois.gamma]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpd8hk34o4/{from.md → to.md} +9 -10
tmp/tmpd8hk34o4/{from.md → to.md} RENAMED
@@ -1,25 +1,24 @@
1
  ##### Class template `gamma_distribution` <a id="rand.dist.pois.gamma">[[rand.dist.pois.gamma]]</a>
2
 
3
  A `gamma_distribution` random number distribution produces random
4
  numbers x > 0 distributed according to the probability density function
5
- $$%
6
- p(x\,|\,\alpha,\beta)
7
- = \frac{e^{-x/\beta}}{\beta^{\alpha} \cdot \Gamma(\alpha)}
8
- \, \cdot \, x^{\, \alpha-1}
9
- \; \mbox{.}$$
10
 
11
  ``` cpp
12
  template<class RealType = double>
13
  class gamma_distribution {
14
  public:
15
  // types
16
  using result_type = RealType;
17
  using param_type = unspecified;
18
 
19
  // constructors and reset functions
20
- explicit gamma_distribution(RealType alpha = 1.0, RealType beta = 1.0);
 
21
  explicit gamma_distribution(const param_type& parm);
22
  void reset();
23
 
24
  // generating functions
25
  template<class URBG>
@@ -36,17 +35,17 @@ template<class RealType = double>
36
  result_type max() const;
37
  };
38
  ```
39
 
40
  ``` cpp
41
- explicit gamma_distribution(RealType alpha = 1.0, RealType beta = 1.0);
42
  ```
43
 
44
- *Requires:* 0 < `alpha` and 0 < `beta`.
45
 
46
- *Effects:* Constructs a `gamma_distribution` object; `alpha` and `beta`
47
- correspond to the parameters of the distribution.
48
 
49
  ``` cpp
50
  RealType alpha() const;
51
  ```
52
 
 
1
  ##### Class template `gamma_distribution` <a id="rand.dist.pois.gamma">[[rand.dist.pois.gamma]]</a>
2
 
3
  A `gamma_distribution` random number distribution produces random
4
  numbers x > 0 distributed according to the probability density function
5
+ $$p(x\,|\,\alpha,\beta) =
6
+ \frac{e^{-x/\beta}}{\beta^{\alpha} \cdot \Gamma(\alpha)} \, \cdot \, x^{\, \alpha-1}
7
+ \text{ .}$$
 
 
8
 
9
  ``` cpp
10
  template<class RealType = double>
11
  class gamma_distribution {
12
  public:
13
  // types
14
  using result_type = RealType;
15
  using param_type = unspecified;
16
 
17
  // constructors and reset functions
18
+ gamma_distribution() : gamma_distribution(1.0) {}
19
+ explicit gamma_distribution(RealType alpha, RealType beta = 1.0);
20
  explicit gamma_distribution(const param_type& parm);
21
  void reset();
22
 
23
  // generating functions
24
  template<class URBG>
 
35
  result_type max() const;
36
  };
37
  ```
38
 
39
  ``` cpp
40
+ explicit gamma_distribution(RealType alpha, RealType beta = 1.0);
41
  ```
42
 
43
+ *Preconditions:* 0 < `alpha` and 0 < `beta`.
44
 
45
+ *Remarks:* `alpha` and `beta` correspond to the parameters of the
46
+ distribution.
47
 
48
  ``` cpp
49
  RealType alpha() const;
50
  ```
51