From Jason Turner

[rand.dist.norm.normal]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdfbssjme/{from.md → to.md} +13 -0
tmp/tmpdfbssjme/{from.md → to.md} RENAMED
@@ -12,10 +12,11 @@ numbers x distributed according to the probability density function $$%
12
  }
13
  \text{ .}$$ The distribution parameters μ and σ are also known as this
14
  distribution’s *mean* and *standard deviation*.
15
 
16
  ``` cpp
 
17
  template<class RealType = double>
18
  class normal_distribution {
19
  public:
20
  // types
21
  using result_type = RealType;
@@ -25,10 +26,13 @@ template<class RealType = double>
25
  normal_distribution() : normal_distribution(0.0) {}
26
  explicit normal_distribution(RealType mean, RealType stddev = 1.0);
27
  explicit normal_distribution(const param_type& parm);
28
  void reset();
29
 
 
 
 
30
  // generating functions
31
  template<class URBG>
32
  result_type operator()(URBG& g);
33
  template<class URBG>
34
  result_type operator()(URBG& g, const param_type& parm);
@@ -38,11 +42,20 @@ template<class RealType = double>
38
  RealType stddev() const;
39
  param_type param() const;
40
  void param(const param_type& parm);
41
  result_type min() const;
42
  result_type max() const;
 
 
 
 
 
 
 
 
43
  };
 
44
  ```
45
 
46
  ``` cpp
47
  explicit normal_distribution(RealType mean, RealType stddev = 1.0);
48
  ```
 
12
  }
13
  \text{ .}$$ The distribution parameters μ and σ are also known as this
14
  distribution’s *mean* and *standard deviation*.
15
 
16
  ``` cpp
17
+ namespace std {
18
  template<class RealType = double>
19
  class normal_distribution {
20
  public:
21
  // types
22
  using result_type = RealType;
 
26
  normal_distribution() : normal_distribution(0.0) {}
27
  explicit normal_distribution(RealType mean, RealType stddev = 1.0);
28
  explicit normal_distribution(const param_type& parm);
29
  void reset();
30
 
31
+ // equality operators
32
+ friend bool operator==(const normal_distribution& x, const normal_distribution& y);
33
+
34
  // generating functions
35
  template<class URBG>
36
  result_type operator()(URBG& g);
37
  template<class URBG>
38
  result_type operator()(URBG& g, const param_type& parm);
 
42
  RealType stddev() const;
43
  param_type param() const;
44
  void param(const param_type& parm);
45
  result_type min() const;
46
  result_type max() const;
47
+
48
+ // inserters and extractors
49
+ template<class charT, class traits>
50
+ friend basic_ostream<charT, traits>&
51
+ operator<<(basic_ostream<charT, traits>& os, const normal_distribution& x);
52
+ template<class charT, class traits>
53
+ friend basic_istream<charT, traits>&
54
+ operator>>(basic_istream<charT, traits>& is, normal_distribution& x);
55
  };
56
+ }
57
  ```
58
 
59
  ``` cpp
60
  explicit normal_distribution(RealType mean, RealType stddev = 1.0);
61
  ```