From Jason Turner

[rand.dist.samp.plinear]

Diff to HTML by rtfpessoa

tmp/tmpu3j24z74/{from.md → to.md} RENAMED
@@ -22,16 +22,15 @@ relation shall hold: $$%
22
  \cdot \sum_{k=0}^{n-1} (w_k + w_{k+1}) \cdot (b_{k+1} - b_k)
23
  \; \mbox{.}$$
24
 
25
  ``` cpp
26
  template<class RealType = double>
27
- class piecewise_linear_distribution
28
- {
29
  public:
30
  // types
31
- typedef RealType result_type;
32
- typedef unspecified param_type;
33
 
34
  // constructor and reset functions
35
  piecewise_linear_distribution();
36
  template<class InputIteratorB, class InputIteratorW>
37
  piecewise_linear_distribution(InputIteratorB firstB, InputIteratorB lastB,
@@ -42,14 +41,14 @@ public:
42
  piecewise_linear_distribution(size_t nw, RealType xmin, RealType xmax, UnaryOperation fw);
43
  explicit piecewise_linear_distribution(const param_type& parm);
44
  void reset();
45
 
46
  // generating functions
47
- template<class URNG>
48
- result_type operator()(URNG& g);
49
- template<class URNG>
50
- result_type operator()(URNG& g, const param_type& parm);
51
 
52
  // property functions
53
  vector<result_type> intervals() const;
54
  vector<result_type> densities() const;
55
  param_type param() const;
 
22
  \cdot \sum_{k=0}^{n-1} (w_k + w_{k+1}) \cdot (b_{k+1} - b_k)
23
  \; \mbox{.}$$
24
 
25
  ``` cpp
26
  template<class RealType = double>
27
+ class piecewise_linear_distribution {
 
28
  public:
29
  // types
30
+ using result_type = RealType;
31
+ using param_type = unspecified;
32
 
33
  // constructor and reset functions
34
  piecewise_linear_distribution();
35
  template<class InputIteratorB, class InputIteratorW>
36
  piecewise_linear_distribution(InputIteratorB firstB, InputIteratorB lastB,
 
41
  piecewise_linear_distribution(size_t nw, RealType xmin, RealType xmax, UnaryOperation fw);
42
  explicit piecewise_linear_distribution(const param_type& parm);
43
  void reset();
44
 
45
  // generating functions
46
+ template<class URBG>
47
+ result_type operator()(URBG& g);
48
+ template<class URBG>
49
+ result_type operator()(URBG& g, const param_type& parm);
50
 
51
  // property functions
52
  vector<result_type> intervals() const;
53
  vector<result_type> densities() const;
54
  param_type param() const;