Boost logo

Boost Users :

Subject: Re: [Boost-users] Generating Multinomial Random Numbers
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-02-10 15:40:46


AMDG

On 2/10/2011 9:25 AM, Stephan Kitchovitch wrote:
> I was looking through the Math/Statistical Distributions and Random boost
> libraries to see if they provide an efficient way to generate random numbers
> from the multinomial distribution. I have read that one way of achieving
> this is to generate from binomial distributions sequentially, although I am
> uncertain as to how efficient this approach would be.

The binomial_distribution implementation in
the current release is very slow for large n.
I've written a replacement that should be
reasonably fast. It will be released in 1.47.

While it's probably possible to generate
multinomial variates faster using a direct
algorithm, you probably can't get more than
a factor of 2, possibly less.

> Are there any
> alternative efficient approaches I could use? Does boost provide any other
> libraries that may help with this?
>
>
>
> If anyone could recommend another reliable random number generator that does
> generate from a multinomial dist it would be great!
>

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net