Title
piecewise_constant_distribution::densities has wrong name
Status
nad
Section
[rand.dist.samp.pconst]
Submitter
P.J. Plauger

Created on 2008-02-09.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change synopsis in [rand.dist.samp.pconst]:

template <class RealType = double> 
class piecewise_constant_distribution 
{ 
public:
    ...
    vector<double> densities probabilities() const;
    ...
};

Change [rand.dist.samp.pconst]/6:

vector<double> densities probabilities() const;
Date: 2010-10-21.18:28:33

[ Bellevue: ]

Fermilab does not agree with this summary. As defined in the equation in 26.4.8.5.2/4, the quantities are indeed probability densities not probabilities. Because we view this distribution as a parameterization of a *probability density function*, we prefer to work in terms of probability densities.

We don't think this should be changed.

If there is a technical argument about why the implementation dealing with these values can't be as efficient as one dealing with probabilities, we might reconsider. We don't care about this one member function being somewhat more or less efficient; we care about the size of the distribution object and the speed of the calls to generate variates.

Date: 2008-02-09.00:00:00

piecewise_constant_distribution::densities() should be probabilities(), just like discrete_distribution. (There's no real use for weights divided by areas.)

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3786
2010-10-21 18:28:33adminsetmessages: + msg3785
2008-02-09 00:00:00admincreate