From Jason Turner

[rand.dist.norm.t]

Diff to HTML by rtfpessoa

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