[ https://issues.apache.org/jira/browse/MATH585?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=13045058#comment13045058
]
Darren Wilkinson commented on MATH585:

It is not urgent in the sense that I can use Parallel COLT! :/ But it is quite a big deal
for anyone wanting to use Commons Math and doing serious Monte Carlo work. Not only is the
gamma distribution itself very important, but the gamma generator is used as the basis for
simulating variates from many other distributions (including inverse gamma, chisquare, inverse
chisquare, beta, Dirichlet, ...), so a slow gamma generator has lots of knockon effects.
It is certainly the next most important nonuniform generator to provide after Gaussian. It
is not trivial to implement well, so I recommend copying or porting another implementation
if possible, though I'm not an expert on open source software licenses so I don't know how
practical that is. The GSL and R are GNU projects which have good C implementations, which
I think are based on slightly better algorithms than the Ahrens and Dieter algorithm you mention
above.
> Very slow generation of gamma random variates
> 
>
> Key: MATH585
> URL: https://issues.apache.org/jira/browse/MATH585
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 2.2, 3.0
> Environment: All
> Reporter: Darren Wilkinson
> Labels: Gamma, Random
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> The current implementation of gamma random variate generation works, but uses an inversion
method. This is wellknown to be a bad idea. Usually a carefully constructed rejection procedure
is used. To give an idea of the magnitude of the problem, the Gamma variate generation in
Parallel COLT is roughly 50 times faster than in Commons Math.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
