Title
Return from densities() functions?
Status
c++11
Section
[rand.dist.samp.pconst]
Submitter
INCITS

Created on 2010-08-25.00:00:00 last changed 162 months ago

Messages

Date: 2010-11-24.14:01:03

Proposed resolution:

  1. Change [rand.dist.samp.pconst] p. 2, class template piecewise_constant_distribution synopsis and the prototype description [rand.dist.samp.pconst] before p. 13 as indicated:
    vector<doubleresult_type> densities() const;
    
  2. Change [rand.dist.samp.plinear] p. 2, class template piecewise_linear_distribution synopsis and the prototype description [rand.dist.samp.plinear] before p. 13 as indicated:
    vector<doubleresult_type> densities() const;
    
Date: 2010-11-24.14:01:03

[ Adopted at 2010-11 Batavia ]

Date: 2010-11-11.19:37:47

[ Batavia 2010: After reviewing this issue, the working group concurred with the first of the suggestions proposed by the NB comment: "Change the piecewise constant and linear distributions to hold/return the densities in a vector. " ]

Date: 2010-10-31.22:52:41

[ Resolution proposed by ballot comment: ]

Change the piecewise constant and linear distributions to hold / return the densities in a vector<result_type>.

If this is not done, at least correct [rand.dist.samp.pconst] p. 13 which describes the return of densities as a vector<result_type>.

Date: 2010-10-24.03:04:13

Addresses US-134

These two distributions have a member function called densities() which returns a vector<double>. The distribution is templated on RealType. The distribution also has another member called intervals() which returns a vector<RealType>. Why doesn't densities return vector<RealType> as well? If RealType is long double, the computed densities property isn't being computed to the precision the client desires. If RealType is float, the densities vector is taking up twice as much space as the client desires.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-11-24 14:01:03adminsetmessages: + msg5435
2010-11-14 13:10:57adminsetstatus: voting -> wp
2010-11-13 01:17:02adminsetstatus: open -> voting
2010-11-13 01:11:40adminsetstatus: immediate -> open
2010-11-11 19:37:47adminsetmessages: + msg5337
2010-11-11 19:37:47adminsetmessages: + msg5336
2010-11-11 19:37:47adminsetstatus: open -> immediate
2010-10-24 03:04:13adminsetmessages: + msg4933
2010-08-25 00:00:00admincreate