Package org.apache.commons.rng.sampling.distribution
This package contains classes for sampling from statistical distributions.
As of version 1.0, the code for specific distributions was adapted from
the corresponding classes in the development version of "Commons Math" (in
package org.apache.commons.math4.distribution
).
When no specific algorithm is provided, one can still sample from any distribution, using the inverse method, as illustrated in:
Algorithms are described in e.g. Luc Devroye (1986), chapter 9 and chapter 10. This paper discusses Gaussian generators.
-
Interface Summary Interface Description ContinuousInverseCumulativeProbabilityFunction Interface for a continuous distribution that can be sampled using the inversion method.ContinuousSampler Sampler that generates values of typedouble
.DiscreteInverseCumulativeProbabilityFunction Interface for a discrete distribution that can be sampled using the inversion method.DiscreteSampler Sampler that generates values of typeint
.LongSampler Sampler that generates values of typelong
.NormalizedGaussianSampler Marker interface for a sampler that generates values from an N(0,1) Gaussian distribution.SharedStateContinuousSampler Sampler that generates values of typedouble
and can create new instances to sample from the same state with a given source of randomness.SharedStateDiscreteSampler Sampler that generates values of typeint
and can create new instances to sample from the same state with a given source of randomness.SharedStateLongSampler Sampler that generates values of typelong
and can create new instances to sample from the same state with a given source of randomness. -
Class Summary Class Description AhrensDieterExponentialSampler Sampling from an exponential distribution.AhrensDieterMarsagliaTsangGammaSampler Sampling from the gamma distribution.AliasMethodDiscreteSampler Distribution sampler that uses the Alias method.BoxMullerGaussianSampler Deprecated. Since version 1.1.BoxMullerLogNormalSampler Deprecated. Since version 1.1.BoxMullerNormalizedGaussianSampler Box-Muller algorithm for sampling from Gaussian distribution with mean 0 and standard deviation 1.ChengBetaSampler Sampling from a beta distribution.ContinuousUniformSampler Sampling from a uniform distribution.DirichletSampler Sampling from a Dirichlet distribution.DiscreteUniformSampler Discrete uniform distribution sampler.FastLoadedDiceRollerDiscreteSampler Distribution sampler that uses the Fast Loaded Dice Roller (FLDR).GaussianSampler Sampling from a Gaussian distribution with given mean and standard deviation.GeometricSampler Sampling from a geometric distribution.GuideTableDiscreteSampler Compute a sample fromn
values each with an associated probability.InverseTransformContinuousSampler Distribution sampler that uses the inversion method.InverseTransformDiscreteSampler Distribution sampler that uses the inversion method.InverseTransformParetoSampler Sampling from a Pareto distribution.KempSmallMeanPoissonSampler Sampler for the Poisson distribution.LargeMeanPoissonSampler Sampler for the Poisson distribution.LevySampler Sampling from a Lévy distribution.LogNormalSampler Sampling from a log-normal distribution.MarsagliaNormalizedGaussianSampler Marsaglia polar method for sampling from a Gaussian distribution with mean 0 and standard deviation 1.MarsagliaTsangWangDiscreteSampler Sampler for a discrete distribution using an optimised look-up table.MarsagliaTsangWangDiscreteSampler.Binomial Create a sampler for the Binomial distribution.MarsagliaTsangWangDiscreteSampler.Enumerated Create a sampler for an enumerated distribution ofn
values each with an associated probability.MarsagliaTsangWangDiscreteSampler.Poisson Create a sampler for the Poisson distribution.PoissonSampler Sampler for the Poisson distribution.PoissonSamplerCache Create a sampler for the Poisson distribution using a cache to minimise construction cost.RejectionInversionZipfSampler Implementation of the Zipf distribution.SamplerBase Deprecated. Since version 1.1.SmallMeanPoissonSampler Sampler for the Poisson distribution.StableSampler Samples from a stable distribution.TSampler Sampling from a T distribution.UniformLongSampler Discrete uniform distribution sampler generating values of typelong
.ZigguratNormalizedGaussianSampler Marsaglia and Tsang "Ziggurat" method for sampling from a Gaussian distribution with mean 0 and standard deviation 1.ZigguratSampler Modified ziggurat method for sampling from Gaussian and exponential distributions.ZigguratSampler.Exponential Modified ziggurat method for sampling from an exponential distribution.ZigguratSampler.NormalizedGaussian Modified ziggurat method for sampling from a Gaussian distribution with mean 0 and standard deviation 1.