Subject: Re: [boost] [random] Speed up binomial and poisson distributions
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-09 21:54:44
Ross Levine wrote:
> I sent Jens an email just now.
> I have a style questions as well. First of all, this new
> poisson_distribution is policy-based (don't worry -- it's
> backwards-compatible with the old one; old code using the
> poisson_distribution will not need to be changed). Since
> poisson_distribution resides in the boost namespace, I didn't know if
> the policies should be placed there as well, or in the boost/random
> nested namespace. For now, they are in the boost/random/detail
> namespace and typedef'ed into the boost namespace.
It's dangerous to define public types in a detail namespace because
> They are named
> pd_fast, pd_small, and pd_legacy. However, it occurred to me that
> perhaps having policy classes in the boost namespace wasn't such a
> good idea, since these classes are not meant to be instatiated
> directly. At the very least, they could have private constructors and
> be friends with the poisson_distribution, but I still don't know if
> they ought to reside in the main boost namespace.
> If anyone knows any rules for this, let me know. As it is there isn't
> much mention of this situation in the developer faq.
> In addition, this header probably needs formal documentation. I am
> unaware of any stylistic guidelines I should follow.
They should go in namespace boost::random.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk