From Jason Turner

[rand.dist.pois.weibull]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp_qgps6dn/{from.md → to.md} +13 -0
tmp/tmp_qgps6dn/{from.md → to.md} RENAMED
@@ -6,10 +6,11 @@ $$p(x\,|\,a,b) = \frac{a}{b}
6
  \cdot \left(\frac{x}{b}\right)^{a-1}
7
  \cdot \, \exp\left( -\left(\frac{x}{b}\right)^a\right)
8
  \text{ .}$$
9
 
10
  ``` cpp
 
11
  template<class RealType = double>
12
  class weibull_distribution {
13
  public:
14
  // types
15
  using result_type = RealType;
@@ -19,10 +20,13 @@ template<class RealType = double>
19
  weibull_distribution() : weibull_distribution(1.0) {}
20
  explicit weibull_distribution(RealType a, RealType b = 1.0);
21
  explicit weibull_distribution(const param_type& parm);
22
  void reset();
23
 
 
 
 
24
  // generating functions
25
  template<class URBG>
26
  result_type operator()(URBG& g);
27
  template<class URBG>
28
  result_type operator()(URBG& g, const param_type& parm);
@@ -32,11 +36,20 @@ template<class RealType = double>
32
  RealType b() const;
33
  param_type param() const;
34
  void param(const param_type& parm);
35
  result_type min() const;
36
  result_type max() const;
 
 
 
 
 
 
 
 
37
  };
 
38
  ```
39
 
40
  ``` cpp
41
  explicit weibull_distribution(RealType a, RealType b = 1.0);
42
  ```
 
6
  \cdot \left(\frac{x}{b}\right)^{a-1}
7
  \cdot \, \exp\left( -\left(\frac{x}{b}\right)^a\right)
8
  \text{ .}$$
9
 
10
  ``` cpp
11
+ namespace std {
12
  template<class RealType = double>
13
  class weibull_distribution {
14
  public:
15
  // types
16
  using result_type = RealType;
 
20
  weibull_distribution() : weibull_distribution(1.0) {}
21
  explicit weibull_distribution(RealType a, RealType b = 1.0);
22
  explicit weibull_distribution(const param_type& parm);
23
  void reset();
24
 
25
+ // equality operators
26
+ friend bool operator==(const weibull_distribution& x, const weibull_distribution& y);
27
+
28
  // generating functions
29
  template<class URBG>
30
  result_type operator()(URBG& g);
31
  template<class URBG>
32
  result_type operator()(URBG& g, const param_type& parm);
 
36
  RealType b() const;
37
  param_type param() const;
38
  void param(const param_type& parm);
39
  result_type min() const;
40
  result_type max() const;
41
+
42
+ // inserters and extractors
43
+ template<class charT, class traits>
44
+ friend basic_ostream<charT, traits>&
45
+ operator<<(basic_ostream<charT, traits>& os, const weibull_distribution& x);
46
+ template<class charT, class traits>
47
+ friend basic_istream<charT, traits>&
48
+ operator>>(basic_istream<charT, traits>& is, weibull_distribution& x);
49
  };
50
+ }
51
  ```
52
 
53
  ``` cpp
54
  explicit weibull_distribution(RealType a, RealType b = 1.0);
55
  ```