-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Thijs van den Berg Sent: 13 April 2014 19:46 To: boost@lists.boost.org Subject: Re: [boost] [math] & [random] distribution object compatibility
AMDG
On 04/13/2014 07:36 AM, Thijs van den Berg wrote:
Boost [random] has probability distribution objects for drawing random samples of those distributions. Boost [math] also has probability distributions, those
free functions for computing properties of the distributions, like mean, pdf etc.
I like the free function design of math variant e.g. it uses
was wondering why this hasn't been adopt in C++11 for <random>? To me a free function syntax like random(distribution,engine) would make sense. It would align with the fact that C++11 has added begin(container) and end(container) free functions.
I think it's a bit inconvenient to have two libs that both contain
provide pdf(distribution,x) and I probability
distributions.
Indeed - but the requirements are quite different. Boost.Math aims to be accurate (and with extension to use Boost.Multiprecision and <cstdfloat> , very, very accurate). Boost.Random must be very fast, but need not be accurate - indeed it may be rather inaccurate? So I doubt if changing either is a good idea. (And anyway they are by different authors developed at different times - so NIH probably applies). Paul --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 01539 561830