Class EnumeratedDistributionSamplersPerformance.FastLoadedDiceRollerDiscreteSamplerSources
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.sampling.distribution.EnumeratedDistributionSamplersPerformance.LocalRandomSources
-
- org.apache.commons.rng.examples.jmh.sampling.distribution.EnumeratedDistributionSamplersPerformance.FastLoadedDiceRollerDiscreteSamplerSources
-
- Enclosing class:
- EnumeratedDistributionSamplersPerformance
public static class EnumeratedDistributionSamplersPerformance.FastLoadedDiceRollerDiscreteSamplerSources extends EnumeratedDistributionSamplersPerformance.LocalRandomSources
TheFastLoadedDiceRollerDiscreteSamplersamplers to use for testing. Creates the sampler for each random source and the probabilities using a Dirichlet distribution.This class is a specialized source to allow examination of the effect of the
FastLoadedDiceRollerDiscreteSampleralphaparameter.
-
-
Constructor Summary
Constructors Constructor Description FastLoadedDiceRollerDiscreteSamplerSources()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscreteSamplercreateSampler()Creates a new instance of the sampler.DiscreteSamplergetSampler()Gets the sampler.voidsetup()Create the distribution probabilities (per iteration as it may vary), the sampler factory and instantiates sampler.-
Methods inherited from class org.apache.commons.rng.examples.jmh.sampling.distribution.EnumeratedDistributionSamplersPerformance.LocalRandomSources
getGenerator
-
-
-
-
Constructor Detail
-
FastLoadedDiceRollerDiscreteSamplerSources
public FastLoadedDiceRollerDiscreteSamplerSources()
-
-
Method Detail
-
getSampler
public DiscreteSampler getSampler()
Gets the sampler.- Returns:
- the sampler.
-
setup
public void setup()
Create the distribution probabilities (per iteration as it may vary), the sampler factory and instantiates sampler.- Overrides:
setupin classEnumeratedDistributionSamplersPerformance.LocalRandomSources
-
createSampler
public DiscreteSampler createSampler()
Creates a new instance of the sampler.- Returns:
- The sampler.
-
-