[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Discrete PRNG
From: |
Rodney Sparapani |
Subject: |
[Help-gsl] Discrete PRNG |
Date: |
Mon, 10 Jan 2011 14:15:11 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.13) Gecko/20101209 Thunderbird/3.1.7 |
Hi:
In the General Discrete Distributions section (19.28), I see this blurb:
... the idea is to
preprocess the probability list, and save the result in some form of
lookup table; then the individual calls for a random discrete event can
go rapidly. An approach invented by G. Marsaglia (Generating discrete
random numbers in a computer, Comm ACM 6, 37-38 (1963)) is very clever,
and readers interested in examples of good algorithm design are
directed to this short and well-written paper. Unfortunately, for
large K, Marsaglia's lookup table can be quite large.
I have relatively small Ks: 3, 6 and 10. And, I'd like to try
Marsaglia's method to see if I can speed up my application. I have the
paper (and I could FAX it if you promise to use it fairly ;o) However,
I must be missing the trick to program this. Has anyone tried it?
I'd be willing to work on contributing this to GSL.
Thanks,
Rodney
- [Help-gsl] Discrete PRNG,
Rodney Sparapani <=