Hi Andrew,

It sounds like you've got a lot of interesting ideas for improving 
Distributions.jl. Please read through the existing codebase when you've got 
some time and submit pull requests for any functionality you'd like to see 
changed.

In regard to your main question, I don't believe we support special RNG's in 
Distributions.

 -- John

On Oct 1, 2014, at 8:32 PM, Andrew Dolgert <[email protected]> wrote:

> It doesn't seem possible to use an explicit random number generator to sample 
> a distribution:
> rng=MersenneTwister(seed)
> rand(Distributions.Exponential(scale), rng)
> Did I miss a way to do this?
> 
> I want to use an explicit generator because
>  - I can serialize it and pick up where I left off with the next run
>  - I can use different generators in different parts of the program
>  - It's good hygiene for stochastic simulations to know when rand is used.
> 
> Using quantile(distribution, rand(rng)) isn't great because it doesn't use 
> the accepted sampling algorithms. For instance, the ziggurat algorithm for 
> exponentials is far better than inverting the cdf.
> 
> Thanks,
> Drew
> 

Reply via email to