Uses of Interface
org.apache.commons.rng.sampling.distribution.SharedStateDiscreteSampler
Packages that use SharedStateDiscreteSampler
Package
Description
This package provides sampling utilities.
This package contains classes for sampling from statistical distributions.
-
Uses of SharedStateDiscreteSampler in org.apache.commons.rng.sampling
Classes in org.apache.commons.rng.sampling that implement SharedStateDiscreteSamplerModifier and TypeClassDescriptionprivate static final class
A class to implement the SharedStateDiscreteSampler interface for a discrete probability sampler given a factory and the probability distribution.private static final class
A composite discrete sampler with shared state support.Fields in org.apache.commons.rng.sampling declared as SharedStateDiscreteSamplerModifier and TypeFieldDescriptionprivate final SharedStateDiscreteSampler
DiscreteProbabilityCollectionSampler.sampler
Sampler for the probabilities.Methods in org.apache.commons.rng.sampling that return SharedStateDiscreteSamplerModifier and TypeMethodDescriptionCompositeSamplers.SharedStateDiscreteSamplerFactory.createSampler
(DiscreteSampler discreteSampler, List<SharedStateDiscreteSampler> samplers) private static SharedStateDiscreteSampler
DiscreteProbabilityCollectionSampler.createSampler
(UniformRandomProvider rng, double[] probabilities) Creates the sampler of the enumerated probability distribution.private static <T> SharedStateDiscreteSampler
DiscreteProbabilityCollectionSampler.createSampler
(UniformRandomProvider rng, List<T> collection, double[] probabilities) Creates the sampler of the enumerated probability distribution.CompositeSamplers.SharedStateDiscreteProbabilitySampler.withUniformRandomProvider
(UniformRandomProvider rng) Methods in org.apache.commons.rng.sampling that return types with arguments of type SharedStateDiscreteSamplerModifier and TypeMethodDescriptionCompositeSamplers.newSharedStateDiscreteSamplerBuilder()
Create a new builder for a compositeSharedStateDiscreteSampler
.Method parameters in org.apache.commons.rng.sampling with type arguments of type SharedStateDiscreteSamplerModifier and TypeMethodDescriptionCompositeSamplers.SharedStateDiscreteSamplerFactory.createSampler
(DiscreteSampler discreteSampler, List<SharedStateDiscreteSampler> samplers) Constructors in org.apache.commons.rng.sampling with parameters of type SharedStateDiscreteSamplerModifierConstructorDescription(package private)
CompositeSharedStateContinuousSampler
(SharedStateDiscreteSampler discreteSampler, List<SharedStateContinuousSampler> samplers) (package private)
CompositeSharedStateDiscreteSampler
(SharedStateDiscreteSampler discreteSampler, List<SharedStateDiscreteSampler> samplers) (package private)
CompositeSharedStateLongSampler
(SharedStateDiscreteSampler discreteSampler, List<SharedStateLongSampler> samplers) (package private)
CompositeSharedStateObjectSampler
(SharedStateDiscreteSampler discreteSampler, List<SharedStateObjectSampler<T>> samplers) private
DiscreteProbabilityCollectionSampler
(List<T> items, SharedStateDiscreteSampler sampler) Constructor parameters in org.apache.commons.rng.sampling with type arguments of type SharedStateDiscreteSamplerModifierConstructorDescription(package private)
CompositeSharedStateDiscreteSampler
(SharedStateDiscreteSampler discreteSampler, List<SharedStateDiscreteSampler> samplers) -
Uses of SharedStateDiscreteSampler in org.apache.commons.rng.sampling.distribution
Classes in org.apache.commons.rng.sampling.distribution that implement SharedStateDiscreteSamplerModifier and TypeClassDescriptionclass
Distribution sampler that uses the Alias method.private static final class
Sample from the computed tables exploiting the small power-of-two table size.class
Discrete uniform distribution sampler.private static class
Base class for a sampler from a discrete uniform distribution.private static final class
Discrete uniform distribution sampler when the sample value is fixed.private static final class
Discrete uniform distribution sampler when the range between lower and upper is too large to fit in a positive integer.private static final class
Adds an offset to an underlying discrete sampler.private static final class
Discrete uniform distribution sampler when the range is a power of 2 and greater than 1.private static final class
Discrete uniform distribution sampler when the range is small enough to fit in a positive integer.class
Distribution sampler that uses the Fast Loaded Dice Roller (FLDR).private static final class
Class to handle the edge case of observations in only one category.private static final class
Class to implement the FLDR sample algorithm.private static final class
Sample from the geometric distribution by using a related exponential distribution.private static final class
Sample from the geometric distribution when the probability of success is 1.final class
Compute a sample fromn
values each with an associated probability.class
Distribution sampler that uses the inversion method.final class
Sampler for the Poisson distribution.class
Sampler for the Poisson distribution.private static class
The base class for Marsaglia-Tsang-Wang samplers.private static final class
Return a fixed result for the Binomial distribution.private static final class
Return an inversion result for the Binomial distribution.private static final class
An implementation for the sample algorithm based on the decomposition of the index in the range[0,2^30)
into 5 base-64 digits with 16-bit backing storage.private static final class
An implementation for the sample algorithm based on the decomposition of the index in the range[0,2^30)
into 5 base-64 digits with 32-bit backing storage.private static final class
An implementation for the sample algorithm based on the decomposition of the index in the range[0,2^30)
into 5 base-64 digits with 8-bit backing storage.class
Sampler for the Poisson distribution.class
Implementation of the Zipf distribution.private static final class
Implements the rejection-inversion method for the Zipf distribution.class
Sampler for the Poisson distribution.Fields in org.apache.commons.rng.sampling.distribution declared as SharedStateDiscreteSamplerModifier and TypeFieldDescriptionprivate final SharedStateDiscreteSampler
DiscreteUniformSampler.delegate
The appropriate uniform sampler for the parameters.private final SharedStateDiscreteSampler
RejectionInversionZipfSampler.delegate
The implementation of the sample method.private static final SharedStateDiscreteSampler
LargeMeanPoissonSampler.NO_SMALL_MEAN_POISSON_SAMPLER
Used when there is no requirement for a small mean Poisson sampler.private final SharedStateDiscreteSampler
PoissonSampler.poissonSamplerDelegate
The internal Poisson sampler.private final SharedStateDiscreteSampler
DiscreteUniformSampler.OffsetDiscreteUniformSampler.sampler
The discrete sampler.private final SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler.sampler
The Binomial distribution sampler.private final SharedStateDiscreteSampler
LargeMeanPoissonSampler.smallMeanPoissonSampler
The internal Poisson sampler for the lambda fraction.Methods in org.apache.commons.rng.sampling.distribution that return SharedStateDiscreteSamplerModifier and TypeMethodDescriptionprivate static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.createBinomialDistributionSampler
(UniformRandomProvider rng, int trials, double probabilityOfSuccess) Creates the Binomial distribution sampler.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.createBinomialDistributionSamplerFromRange
(UniformRandomProvider rng, int trials, double p, boolean useInversion, double p0, int begin, int end) Creates the Binomial distribution sampler using only the probability values forX
between the begin and the end (inclusive).private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Poisson.createPoissonDistributionFromX0
(UniformRandomProvider rng, double mean) Creates the Poisson distribution by computing probabilities recursively fromX=0
.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Poisson.createPoissonDistributionFromXMode
(UniformRandomProvider rng, double mean) Creates the Poisson distribution by computing probabilities recursively upward and downward fromX=mode
, the location of the largest p-value.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.createSampler
(UniformRandomProvider rng, String distributionName, int[] prob, int offset) Create a new instance for probabilitiesp(i)
where the sample valuex
isi + offset
.PoissonSamplerCache.createSharedStateSampler
(UniformRandomProvider rng, double mean) Creates a new Poisson sampler.static SharedStateDiscreteSampler
AliasMethodDiscreteSampler.of
(UniformRandomProvider rng, double[] probabilities) Creates a sampler.static SharedStateDiscreteSampler
AliasMethodDiscreteSampler.of
(UniformRandomProvider rng, double[] probabilities, int alpha) Creates a sampler.static SharedStateDiscreteSampler
DiscreteUniformSampler.of
(UniformRandomProvider rng, int lower, int upper) Creates a new discrete uniform distribution sampler.static SharedStateDiscreteSampler
GeometricSampler.of
(UniformRandomProvider rng, double probabilityOfSuccess) Creates a new geometric distribution sampler.static SharedStateDiscreteSampler
GuideTableDiscreteSampler.of
(UniformRandomProvider rng, double[] probabilities) Create a new sampler for an enumerated distribution using the givenprobabilities
.static SharedStateDiscreteSampler
GuideTableDiscreteSampler.of
(UniformRandomProvider rng, double[] probabilities, double alpha) Create a new sampler for an enumerated distribution using the givenprobabilities
.static SharedStateDiscreteSampler
InverseTransformDiscreteSampler.of
(UniformRandomProvider rng, DiscreteInverseCumulativeProbabilityFunction function) Create a new inverse-transform discrete sampler.static SharedStateDiscreteSampler
KempSmallMeanPoissonSampler.of
(UniformRandomProvider rng, double mean) Creates a new sampler for the Poisson distribution.static SharedStateDiscreteSampler
LargeMeanPoissonSampler.of
(UniformRandomProvider rng, double mean) Creates a new Poisson distribution sampler.static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.of
(UniformRandomProvider rng, int trials, double probabilityOfSuccess) Creates a sampler for the Binomial distribution.static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Enumerated.of
(UniformRandomProvider rng, double[] probabilities) Creates a sampler for an enumerated distribution ofn
values each with an associated probability.static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Poisson.of
(UniformRandomProvider rng, double mean) Creates a sampler for the Poisson distribution.static SharedStateDiscreteSampler
PoissonSampler.of
(UniformRandomProvider rng, double mean) Creates a new Poisson distribution sampler.static SharedStateDiscreteSampler
RejectionInversionZipfSampler.of
(UniformRandomProvider rng, int numberOfElements, double exponent) Creates a new Zipf distribution sampler.static SharedStateDiscreteSampler
SmallMeanPoissonSampler.of
(UniformRandomProvider rng, double mean) Creates a new sampler for the Poisson distribution.AliasMethodDiscreteSampler.SmallTableAliasMethodDiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.AliasMethodDiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.DiscreteUniformSampler.FixedDiscreteUniformSampler.withUniformRandomProvider
(UniformRandomProvider rng) DiscreteUniformSampler.LargeRangeDiscreteUniformSampler.withUniformRandomProvider
(UniformRandomProvider rng) DiscreteUniformSampler.OffsetDiscreteUniformSampler.withUniformRandomProvider
(UniformRandomProvider rng) DiscreteUniformSampler.PowerOf2RangeDiscreteUniformSampler.withUniformRandomProvider
(UniformRandomProvider rng) DiscreteUniformSampler.SmallRangeDiscreteUniformSampler.withUniformRandomProvider
(UniformRandomProvider rng) DiscreteUniformSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.GeometricSampler.GeometricExponentialSampler.withUniformRandomProvider
(UniformRandomProvider rng) GeometricSampler.GeometricP1Sampler.withUniformRandomProvider
(UniformRandomProvider rng) GuideTableDiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.InverseTransformDiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.KempSmallMeanPoissonSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.LargeMeanPoissonSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangFixedResultBinomialSampler.withUniformRandomProvider
(UniformRandomProvider rng) MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler.withUniformRandomProvider
(UniformRandomProvider rng) MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int16DiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int32DiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int8DiscreteSampler.withUniformRandomProvider
(UniformRandomProvider rng) PoissonSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.RejectionInversionZipfSampler.RejectionInversionZipfSamplerImpl.withUniformRandomProvider
(UniformRandomProvider rng) RejectionInversionZipfSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SmallMeanPoissonSampler.withUniformRandomProvider
(UniformRandomProvider rng) Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.Constructors in org.apache.commons.rng.sampling.distribution with parameters of type SharedStateDiscreteSamplerModifierConstructorDescriptionprivate
Private constructor used by to prevent partially initialized object if the construction of the delegate throws.(package private)
MarsagliaTsangWangInversionBinomialSampler
(int trials, SharedStateDiscreteSampler sampler) (package private)
OffsetDiscreteUniformSampler
(int offset, SharedStateDiscreteSampler sampler) private
PoissonSampler
(SharedStateDiscreteSampler delegate) private
Private constructor used by to prevent partially initialized object if the construction of the delegate throws.