From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-10-21 11:35:03
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Peter Dimov
| Sent: 18 October 2006 17:35
| To: boost_at_[hidden]
| Subject: Re: [boost] namespace for math function and
| statistics distributions
| Paul A Bristow wrote:
| > Each statistical probability distribution, like negative_binomial
| > includes a typedef
| > typedef negative_binomial_distribution<double>
| negative_binomial; //
| > Reserved name of type double.
| > so that users have the great convenience (when using
| double - 99% of
| > use?)
| > of specifiying distributions thus
| > using boost::math::negative_binomial; // default type is double.
| > negative_binomial mydist(8., 0.25);
| > rather than having to use the rather long full, type
| specified name:
| > negative_binomial_distribution<double> my8dist(8., 0.25);
| There's also the option of
| negative_binomial_distribution<> my8dist(8., 0.25);
Thanks for this suggestion.
It has prompted us to think again and conclude that a new namespace would be too big a hammer for such a small nut.
A default RealType = double would be generally convenient, and we will just have to make an exceptionor the 3 cases of name clash
when users will have to use the form
binomial_distribution<> mydist(8., 0.25);
binomial mydist(8., 0.25);
beta_distribution<> mydist(8., 0.25);
gamma_distribution<> mydist(8., 0.25);
An acceptable nuisance to users, we think.
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk