tmp/tmpdsc4yfmr/{from.md → to.md}
RENAMED
|
@@ -1,27 +1,25 @@
|
|
| 1 |
##### Class template `student_t_distribution` <a id="rand.dist.norm.t">[[rand.dist.norm.t]]</a>
|
| 2 |
|
| 3 |
A `student_t_distribution` random number distribution produces random
|
| 4 |
-
numbers x distributed according to the probability density function
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
{\sqrt{n \pi}}
|
| 8 |
-
\cdot \frac{\Gamma\big((n+1)/2\big)}
|
| 9 |
-
{\Gamma(n/2)}
|
| 10 |
\cdot \left(1 + \frac{x^2}{n} \right)^{-(n+1)/2}
|
| 11 |
-
\
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
template<class RealType = double>
|
| 15 |
class student_t_distribution {
|
| 16 |
public:
|
| 17 |
// types
|
| 18 |
using result_type = RealType;
|
| 19 |
using param_type = unspecified;
|
| 20 |
|
| 21 |
// constructor and reset functions
|
| 22 |
-
|
|
|
|
| 23 |
explicit student_t_distribution(const param_type& parm);
|
| 24 |
void reset();
|
| 25 |
|
| 26 |
// generating functions
|
| 27 |
template<class URBG>
|
|
@@ -37,17 +35,16 @@ template<class RealType = double>
|
|
| 37 |
result_type max() const;
|
| 38 |
};
|
| 39 |
```
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
-
explicit student_t_distribution(RealType n
|
| 43 |
```
|
| 44 |
|
| 45 |
-
*
|
| 46 |
|
| 47 |
-
*
|
| 48 |
-
to the parameter of the distribution.
|
| 49 |
|
| 50 |
``` cpp
|
| 51 |
RealType n() const;
|
| 52 |
```
|
| 53 |
|
|
|
|
| 1 |
##### Class template `student_t_distribution` <a id="rand.dist.norm.t">[[rand.dist.norm.t]]</a>
|
| 2 |
|
| 3 |
A `student_t_distribution` random number distribution produces random
|
| 4 |
+
numbers x distributed according to the probability density function
|
| 5 |
+
$$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;
|
| 16 |
using param_type = unspecified;
|
| 17 |
|
| 18 |
// constructor and reset functions
|
| 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>
|
|
|
|
| 35 |
result_type max() const;
|
| 36 |
};
|
| 37 |
```
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
+
explicit student_t_distribution(RealType n);
|
| 41 |
```
|
| 42 |
|
| 43 |
+
*Preconditions:* 0 < `n`.
|
| 44 |
|
| 45 |
+
*Remarks:* `n` corresponds to the parameter of the distribution.
|
|
|
|
| 46 |
|
| 47 |
``` cpp
|
| 48 |
RealType n() const;
|
| 49 |
```
|
| 50 |
|