
Boost : 
From: Paul A Bristow (pbristow_at_[hidden])
Date: 20061018 12:09:29
John Maddock and I have been beavering away on the many math function and statistics distributions but are uncertain if and how best
to use namespaces, so we are asking for views because we need to make rather pervasive decisions now (that we should have done
before ;).
There are existing math functions (octonions, quaternions, acosh) in
namespace boost::math::
and John has added many more, for example:
#include <boost/math/special_functions/beta.hpp> // for ibeta(a, b, x) == Ix(a, b).
so users can write
using boost::math::ibeta_invb;
ibeta_invb(r, p, P);
So far, so good.
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);
This seems neat, except that there are functions beta, gamma and binomial :((
So there is a name clash when using thus:
using boost::math::binomial;
binomial mydist(2., 0.5); // is it a function or a probability distribution?
We are therefore considering to use namespaces to separate the math functions from the stats distributions
into namespace boost::math::distributions, or ?
so users would write:
using boost::math::distributions::binomial;
binomial mydist(8., 0.25);
Or should it be in namespace boost::statistics;
or boost::statistics::distributions
or should all the functions be in namespace boost::math::functions  changing much existing code :((
or ????
Views please.
Paul
 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