Title
Defect in [rand.dist.samp.genpdf]
Status
resolved
Section
[rand.dist.samp.genpdf]
Submitter
Stephan Tolksdorf

Created on 2007-09-21.00:00:00 last changed 163 months ago

Messages

Date: 2011-04-27.21:19:46

Rationale:

Addressed by N2836 "Wording Tweaks for Concept-enabled Random Number Generation in C++0X".

Date: 2010-10-21.18:28:33

Proposed resolution:

See N2813 for the proposed resolution.

Date: 2010-10-21.18:28:33

[ Bellevue: ]

Disagreement persists.

Objection to this issue is that this function takes a general functor. The general approach would be to normalize this function, integrate it, and take the inverse of the integral, which is not possible in general. An example function is sin(1+n*x) — for any spatial frequency that the implementor chooses, there is a value of n that renders that choice arbitrarily erroneous.

Correction: The formula above should instead read 1+sin(n*x).

Objector proposes the following possible compromise positions:

  • rand.dist.samp.genpdf takes an number of points so that implementor need not guess.
  • replace rand.disk.samp.genpdf with an extension to either or both of the discrete functions to take arguments that take a functor and number of points in place of the list of probabilities. Reference issues 793 and 794.
Date: 2007-09-21.00:00:00

[rand.dist.samp.genpdf] describes the interface for a distribution template that is meant to simulate random numbers from any general distribution given only the density and the support of the distribution. I'm not aware of any general purpose algorithm that would be capable of correctly and efficiently implementing the described functionality. From what I know, this is essentially an unsolved research problem. Existing algorithms either require more knowledge about the distribution and the problem domain or work only under very limited circumstances. Even the state of the art special purpose library UNU.RAN does not solve the problem in full generality, and in any case, testing and customer support for such a library feature would be a nightmare.

Possible resolution: For these reasons, I propose to delete section [rand.dist.samp.genpdf].

History
Date User Action Args
2010-12-05 14:14:49adminsetstatus: nad editorial -> resolved
2010-10-21 18:28:33adminsetmessages: + msg3589
2010-10-21 18:28:33adminsetmessages: + msg3588
2010-10-21 18:28:33adminsetmessages: + msg3587
2007-09-21 00:00:00admincreate