Description
The paper describing the ZigguratNormalizedGaussianSampler also provides code for sampling from an exponential distribution.
public class ZigguratExponentialSampler implements SharedStateContinuousSampler { public ZigguratExponentialSampler withUniformRandomProvider(UniformRandomProvider rng); public static ZigguratExponentialSampler of(UniformRandomProvider rng); public static ZigguratExponentialSampler of(UniformRandomProvider rng, double mean); }
I suggest allowing creation of a sampler with mean 1. This special case has application in other samplers, for example the LargeMeanPoissonSampler.