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 classCompositeSamplers.SharedStateDiscreteProbabilitySamplerA class to implement the SharedStateDiscreteSampler interface for a discrete probability sampler given a factory and the probability distribution.private static classCompositeSamplers.SharedStateDiscreteSamplerFactory.CompositeSharedStateDiscreteSamplerA composite discrete sampler with shared state support.Fields in org.apache.commons.rng.sampling declared as SharedStateDiscreteSampler Modifier and Type Field Description private SharedStateDiscreteSamplerDiscreteProbabilityCollectionSampler. samplerSampler for the probabilities.Methods in org.apache.commons.rng.sampling that return SharedStateDiscreteSampler Modifier and Type Method Description SharedStateDiscreteSamplerCompositeSamplers.SharedStateDiscreteSamplerFactory. createSampler(DiscreteSampler discreteSampler, java.util.List<SharedStateDiscreteSampler> samplers)private static SharedStateDiscreteSamplerDiscreteProbabilityCollectionSampler. createSampler(UniformRandomProvider rng, double[] probabilities)Creates the sampler of the enumerated probability distribution.private static <T> SharedStateDiscreteSamplerDiscreteProbabilityCollectionSampler. createSampler(UniformRandomProvider rng, java.util.List<T> collection, double[] probabilities)Creates the sampler of the enumerated probability distribution.SharedStateDiscreteSamplerCompositeSamplers.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 SharedStateDiscreteSamplerCompositeSamplers.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 classAliasMethodDiscreteSamplerDistribution sampler that uses the Alias method.private static classAliasMethodDiscreteSampler.SmallTableAliasMethodDiscreteSamplerSample from the computed tables exploiting the small power-of-two table size.classDiscreteUniformSamplerDiscrete uniform distribution sampler.private static classDiscreteUniformSampler.AbstractDiscreteUniformSamplerBase class for a sampler from a discrete uniform distribution.private static classDiscreteUniformSampler.FixedDiscreteUniformSamplerDiscrete uniform distribution sampler when the sample value is fixed.private static classDiscreteUniformSampler.LargeRangeDiscreteUniformSamplerDiscrete uniform distribution sampler when the range between lower and upper is too large to fit in a positive integer.private static classDiscreteUniformSampler.OffsetDiscreteUniformSamplerAdds an offset to an underlying discrete sampler.private static classDiscreteUniformSampler.PowerOf2RangeDiscreteUniformSamplerDiscrete uniform distribution sampler when the range is a power of 2 and greater than 1.private static classDiscreteUniformSampler.SmallRangeDiscreteUniformSamplerDiscrete uniform distribution sampler when the range is small enough to fit in a positive integer.classFastLoadedDiceRollerDiscreteSamplerDistribution sampler that uses the Fast Loaded Dice Roller (FLDR).private static classFastLoadedDiceRollerDiscreteSampler.FixedValueDiscreteSamplerClass to handle the edge case of observations in only one category.private static classFastLoadedDiceRollerDiscreteSampler.FLDRSamplerClass to implement the FLDR sample algorithm.private static classGeometricSampler.GeometricExponentialSamplerSample from the geometric distribution by using a related exponential distribution.private static classGeometricSampler.GeometricP1SamplerSample from the geometric distribution when the probability of success is 1.classGuideTableDiscreteSamplerCompute a sample fromnvalues each with an associated probability.classInverseTransformDiscreteSamplerDistribution sampler that uses the inversion method.classKempSmallMeanPoissonSamplerSampler for the Poisson distribution.classLargeMeanPoissonSamplerSampler for the Poisson distribution.private static classMarsagliaTsangWangDiscreteSampler.AbstractMarsagliaTsangWangDiscreteSamplerThe base class for Marsaglia-Tsang-Wang samplers.private static classMarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangFixedResultBinomialSamplerReturn a fixed result for the Binomial distribution.private static classMarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSamplerReturn an inversion result for the Binomial distribution.private static classMarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int16DiscreteSamplerAn 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 classMarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int32DiscreteSamplerAn 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 classMarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int8DiscreteSamplerAn 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.classPoissonSamplerSampler for the Poisson distribution.classRejectionInversionZipfSamplerImplementation of the Zipf distribution.private static classRejectionInversionZipfSampler.RejectionInversionZipfSamplerImplImplements the rejection-inversion method for the Zipf distribution.classSmallMeanPoissonSamplerSampler for the Poisson distribution.Fields in org.apache.commons.rng.sampling.distribution declared as SharedStateDiscreteSampler Modifier and Type Field Description private SharedStateDiscreteSamplerDiscreteUniformSampler. delegateThe appropriate uniform sampler for the parameters.private SharedStateDiscreteSamplerRejectionInversionZipfSampler. delegateThe implementation of the sample method.private static SharedStateDiscreteSamplerLargeMeanPoissonSampler. NO_SMALL_MEAN_POISSON_SAMPLERUsed when there is no requirement for a small mean Poisson sampler.private SharedStateDiscreteSamplerPoissonSampler. poissonSamplerDelegateThe internal Poisson sampler.private SharedStateDiscreteSamplerDiscreteUniformSampler.OffsetDiscreteUniformSampler. samplerThe discrete sampler.private SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler. samplerThe Binomial distribution sampler.private SharedStateDiscreteSamplerLargeMeanPoissonSampler. smallMeanPoissonSamplerThe 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 SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Binomial. createBinomialDistributionSampler(UniformRandomProvider rng, int trials, double probabilityOfSuccess)Creates the Binomial distribution sampler.private static SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.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 forXbetween the begin and the end (inclusive).private static SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Poisson. createPoissonDistributionFromX0(UniformRandomProvider rng, double mean)Creates the Poisson distribution by computing probabilities recursively fromX=0.private static SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.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 SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler. createSampler(UniformRandomProvider rng, java.lang.String distributionName, int[] prob, int offset)Create a new instance for probabilitiesp(i)where the sample valuexisi + offset.SharedStateDiscreteSamplerPoissonSamplerCache. createSharedStateSampler(UniformRandomProvider rng, double mean)Creates a new Poisson sampler.static SharedStateDiscreteSamplerAliasMethodDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities)Creates a sampler.static SharedStateDiscreteSamplerAliasMethodDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities, int alpha)Creates a sampler.static SharedStateDiscreteSamplerDiscreteUniformSampler. of(UniformRandomProvider rng, int lower, int upper)Creates a new discrete uniform distribution sampler.static SharedStateDiscreteSamplerGeometricSampler. of(UniformRandomProvider rng, double probabilityOfSuccess)Creates a new geometric distribution sampler.static SharedStateDiscreteSamplerGuideTableDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities)Create a new sampler for an enumerated distribution using the givenprobabilities.static SharedStateDiscreteSamplerGuideTableDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities, double alpha)Create a new sampler for an enumerated distribution using the givenprobabilities.static SharedStateDiscreteSamplerInverseTransformDiscreteSampler. of(UniformRandomProvider rng, DiscreteInverseCumulativeProbabilityFunction function)Create a new inverse-transform discrete sampler.static SharedStateDiscreteSamplerKempSmallMeanPoissonSampler. of(UniformRandomProvider rng, double mean)Creates a new sampler for the Poisson distribution.static SharedStateDiscreteSamplerLargeMeanPoissonSampler. of(UniformRandomProvider rng, double mean)Creates a new Poisson distribution sampler.static SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Binomial. of(UniformRandomProvider rng, int trials, double probabilityOfSuccess)Creates a sampler for the Binomial distribution.static SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Enumerated. of(UniformRandomProvider rng, double[] probabilities)Creates a sampler for an enumerated distribution ofnvalues each with an associated probability.static SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Poisson. of(UniformRandomProvider rng, double mean)Creates a sampler for the Poisson distribution.static SharedStateDiscreteSamplerPoissonSampler. of(UniformRandomProvider rng, double mean)Creates a new Poisson distribution sampler.static SharedStateDiscreteSamplerRejectionInversionZipfSampler. of(UniformRandomProvider rng, int numberOfElements, double exponent)Creates a new Zipf distribution sampler.static SharedStateDiscreteSamplerSmallMeanPoissonSampler. of(UniformRandomProvider rng, double mean)Creates a new sampler for the Poisson distribution.SharedStateDiscreteSamplerAliasMethodDiscreteSampler.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.SharedStateDiscreteSamplerAliasMethodDiscreteSampler. 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.SharedStateDiscreteSamplerDiscreteUniformSampler.FixedDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerDiscreteUniformSampler.LargeRangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerDiscreteUniformSampler.OffsetDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerDiscreteUniformSampler.PowerOf2RangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerDiscreteUniformSampler.SmallRangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerDiscreteUniformSampler. 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.SharedStateDiscreteSamplerGeometricSampler.GeometricExponentialSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerGeometricSampler.GeometricP1Sampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerGuideTableDiscreteSampler. 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.SharedStateDiscreteSamplerInverseTransformDiscreteSampler. 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.SharedStateDiscreteSamplerKempSmallMeanPoissonSampler. 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.SharedStateDiscreteSamplerLargeMeanPoissonSampler. 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.SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangFixedResultBinomialSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int16DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int32DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerMarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int8DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerPoissonSampler. 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.SharedStateDiscreteSamplerRejectionInversionZipfSampler.RejectionInversionZipfSamplerImpl. withUniformRandomProvider(UniformRandomProvider rng)SharedStateDiscreteSamplerRejectionInversionZipfSampler. 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.SharedStateDiscreteSamplerSmallMeanPoissonSampler. 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.
-