From Jason Turner

[rand.dist.samp.pconst]

Diff to HTML by rtfpessoa

tmp/tmpnifjy3xe/{from.md → to.md} RENAMED
@@ -21,34 +21,34 @@ commonly known as the *weights* , shall be non-negative, non-NaN, and
21
  non-infinity. Moreover, the following relation shall hold:
22
  0 < S = w₀ + ⋯ + wₙ₋₁.
23
 
24
  ``` cpp
25
  template<class RealType = double>
26
- class piecewise_constant_distribution
27
- {
28
  public:
29
  // types
30
- typedef RealType result_type;
31
- typedef unspecified param_type;
32
 
33
  // constructor and reset functions
34
  piecewise_constant_distribution();
35
  template<class InputIteratorB, class InputIteratorW>
36
  piecewise_constant_distribution(InputIteratorB firstB, InputIteratorB lastB,
37
  InputIteratorW firstW);
38
  template<class UnaryOperation>
39
  piecewise_constant_distribution(initializer_list<RealType> bl, UnaryOperation fw);
40
  template<class UnaryOperation>
41
- piecewise_constant_distribution(size_t nw, RealType xmin, RealType xmax, UnaryOperation fw);
 
42
  explicit piecewise_constant_distribution(const param_type& parm);
43
  void reset();
44
 
45
  // generating functions
46
- template<class URNG>
47
- result_type operator()(URNG& g);
48
- template<class URNG>
49
- result_type operator()(URNG& 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;
 
21
  non-infinity. Moreover, the following relation shall hold:
22
  0 < S = w₀ + ⋯ + wₙ₋₁.
23
 
24
  ``` cpp
25
  template<class RealType = double>
26
+ class piecewise_constant_distribution {
 
27
  public:
28
  // types
29
+ using result_type = RealType;
30
+ using param_type = unspecified;
31
 
32
  // constructor and reset functions
33
  piecewise_constant_distribution();
34
  template<class InputIteratorB, class InputIteratorW>
35
  piecewise_constant_distribution(InputIteratorB firstB, InputIteratorB lastB,
36
  InputIteratorW firstW);
37
  template<class UnaryOperation>
38
  piecewise_constant_distribution(initializer_list<RealType> bl, UnaryOperation fw);
39
  template<class UnaryOperation>
40
+ piecewise_constant_distribution(size_t nw, RealType xmin, RealType xmax,
41
+ UnaryOperation fw);
42
  explicit piecewise_constant_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;