Uses of Interface
org.apache.commons.rng.sampling.distribution.SharedStateDiscreteSampler
-
Packages that use SharedStateDiscreteSampler Package Description org.apache.commons.rng.sampling This package provides sampling utilities.org.apache.commons.rng.sampling.distribution 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 SharedStateDiscreteSampler Modifier and Type Class Description private static class
CompositeSamplers.SharedStateDiscreteProbabilitySampler
A class to implement the SharedStateDiscreteSampler interface for a discrete probability sampler given a factory and the probability distribution.private static class
CompositeSamplers.SharedStateDiscreteSamplerFactory.CompositeSharedStateDiscreteSampler
A composite discrete sampler with shared state support.Fields in org.apache.commons.rng.sampling declared as SharedStateDiscreteSampler Modifier and Type Field Description private SharedStateDiscreteSampler
DiscreteProbabilityCollectionSampler. sampler
Sampler for the probabilities.Methods in org.apache.commons.rng.sampling that return SharedStateDiscreteSampler Modifier and Type Method Description SharedStateDiscreteSampler
CompositeSamplers.SharedStateDiscreteSamplerFactory. createSampler(DiscreteSampler discreteSampler, java.util.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, java.util.List<T> collection, double[] probabilities)
Creates the sampler of the enumerated probability distribution.SharedStateDiscreteSampler
CompositeSamplers.SharedStateDiscreteProbabilitySampler. withUniformRandomProvider(UniformRandomProvider rng)
Methods in org.apache.commons.rng.sampling that return types with arguments of type SharedStateDiscreteSampler Modifier and Type Method Description static CompositeSamplers.Builder<SharedStateDiscreteSampler>
CompositeSamplers. newSharedStateDiscreteSamplerBuilder()
Create a new builder for a compositeSharedStateDiscreteSampler
.Method parameters in org.apache.commons.rng.sampling with type arguments of type SharedStateDiscreteSampler Modifier and Type Method Description SharedStateDiscreteSampler
CompositeSamplers.SharedStateDiscreteSamplerFactory. createSampler(DiscreteSampler discreteSampler, java.util.List<SharedStateDiscreteSampler> samplers)
Constructors in org.apache.commons.rng.sampling with parameters of type SharedStateDiscreteSampler Constructor Description CompositeSharedStateContinuousSampler(SharedStateDiscreteSampler discreteSampler, java.util.List<SharedStateContinuousSampler> samplers)
CompositeSharedStateDiscreteSampler(SharedStateDiscreteSampler discreteSampler, java.util.List<SharedStateDiscreteSampler> samplers)
CompositeSharedStateLongSampler(SharedStateDiscreteSampler discreteSampler, java.util.List<SharedStateLongSampler> samplers)
CompositeSharedStateObjectSampler(SharedStateDiscreteSampler discreteSampler, java.util.List<SharedStateObjectSampler<T>> samplers)
DiscreteProbabilityCollectionSampler(java.util.List<T> items, SharedStateDiscreteSampler sampler)
Constructor parameters in org.apache.commons.rng.sampling with type arguments of type SharedStateDiscreteSampler Constructor Description CompositeSharedStateDiscreteSampler(SharedStateDiscreteSampler discreteSampler, java.util.List<SharedStateDiscreteSampler> samplers)
-
Uses of SharedStateDiscreteSampler in org.apache.commons.rng.sampling.distribution
Classes in org.apache.commons.rng.sampling.distribution that implement SharedStateDiscreteSampler Modifier and Type Class Description class
AliasMethodDiscreteSampler
Distribution sampler that uses the Alias method.private static class
AliasMethodDiscreteSampler.SmallTableAliasMethodDiscreteSampler
Sample from the computed tables exploiting the small power-of-two table size.class
DiscreteUniformSampler
Discrete uniform distribution sampler.private static class
DiscreteUniformSampler.AbstractDiscreteUniformSampler
Base class for a sampler from a discrete uniform distribution.private static class
DiscreteUniformSampler.FixedDiscreteUniformSampler
Discrete uniform distribution sampler when the sample value is fixed.private static class
DiscreteUniformSampler.LargeRangeDiscreteUniformSampler
Discrete uniform distribution sampler when the range between lower and upper is too large to fit in a positive integer.private static class
DiscreteUniformSampler.OffsetDiscreteUniformSampler
Adds an offset to an underlying discrete sampler.private static class
DiscreteUniformSampler.PowerOf2RangeDiscreteUniformSampler
Discrete uniform distribution sampler when the range is a power of 2 and greater than 1.private static class
DiscreteUniformSampler.SmallRangeDiscreteUniformSampler
Discrete uniform distribution sampler when the range is small enough to fit in a positive integer.class
FastLoadedDiceRollerDiscreteSampler
Distribution sampler that uses the Fast Loaded Dice Roller (FLDR).private static class
FastLoadedDiceRollerDiscreteSampler.FixedValueDiscreteSampler
Class to handle the edge case of observations in only one category.private static class
FastLoadedDiceRollerDiscreteSampler.FLDRSampler
Class to implement the FLDR sample algorithm.private static class
GeometricSampler.GeometricExponentialSampler
Sample from the geometric distribution by using a related exponential distribution.private static class
GeometricSampler.GeometricP1Sampler
Sample from the geometric distribution when the probability of success is 1.class
GuideTableDiscreteSampler
Compute a sample fromn
values each with an associated probability.class
InverseTransformDiscreteSampler
Distribution sampler that uses the inversion method.class
KempSmallMeanPoissonSampler
Sampler for the Poisson distribution.class
LargeMeanPoissonSampler
Sampler for the Poisson distribution.private static class
MarsagliaTsangWangDiscreteSampler.AbstractMarsagliaTsangWangDiscreteSampler
The base class for Marsaglia-Tsang-Wang samplers.private static class
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangFixedResultBinomialSampler
Return a fixed result for the Binomial distribution.private static class
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler
Return an inversion result for the Binomial distribution.private static class
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int16DiscreteSampler
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 class
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int32DiscreteSampler
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 class
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int8DiscreteSampler
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
PoissonSampler
Sampler for the Poisson distribution.class
RejectionInversionZipfSampler
Implementation of the Zipf distribution.private static class
RejectionInversionZipfSampler.RejectionInversionZipfSamplerImpl
Implements the rejection-inversion method for the Zipf distribution.class
SmallMeanPoissonSampler
Sampler for the Poisson distribution.Fields in org.apache.commons.rng.sampling.distribution declared as SharedStateDiscreteSampler Modifier and Type Field Description private SharedStateDiscreteSampler
DiscreteUniformSampler. delegate
The appropriate uniform sampler for the parameters.private SharedStateDiscreteSampler
RejectionInversionZipfSampler. delegate
The implementation of the sample method.private static SharedStateDiscreteSampler
LargeMeanPoissonSampler. NO_SMALL_MEAN_POISSON_SAMPLER
Used when there is no requirement for a small mean Poisson sampler.private SharedStateDiscreteSampler
PoissonSampler. poissonSamplerDelegate
The internal Poisson sampler.private SharedStateDiscreteSampler
DiscreteUniformSampler.OffsetDiscreteUniformSampler. sampler
The discrete sampler.private SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler. sampler
The Binomial distribution sampler.private SharedStateDiscreteSampler
LargeMeanPoissonSampler. smallMeanPoissonSampler
The internal Poisson sampler for the lambda fraction.Methods in org.apache.commons.rng.sampling.distribution that return SharedStateDiscreteSampler Modifier and Type Method Description private 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, java.lang.String distributionName, int[] prob, int offset)
Create a new instance for probabilitiesp(i)
where the sample valuex
isi + offset
.SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
DiscreteUniformSampler.FixedDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.LargeRangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.OffsetDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.PowerOf2RangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.SmallRangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
GeometricSampler.GeometricExponentialSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
GeometricSampler.GeometricP1Sampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangFixedResultBinomialSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int16DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int32DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int8DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
RejectionInversionZipfSampler.RejectionInversionZipfSamplerImpl. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
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.SharedStateDiscreteSampler
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 SharedStateDiscreteSampler Constructor Description DiscreteUniformSampler(SharedStateDiscreteSampler delegate)
Private constructor used by to prevent partially initialized object if the construction of the delegate throws.MarsagliaTsangWangInversionBinomialSampler(int trials, SharedStateDiscreteSampler sampler)
OffsetDiscreteUniformSampler(int offset, SharedStateDiscreteSampler sampler)
PoissonSampler(SharedStateDiscreteSampler delegate)
RejectionInversionZipfSampler(SharedStateDiscreteSampler delegate)
Private constructor used by to prevent partially initialized object if the construction of the delegate throws.
-