Class DiscreteUniformSamplerGenerationPerformance
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.sampling.distribution.DiscreteUniformSamplerGenerationPerformance
-
public class DiscreteUniformSamplerGenerationPerformance extends Object
Executes benchmark to compare the speed of generation of integer numbers in a positive range using theDiscreteUniformSampler
orUniformRandomProvider.nextInt(int)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DiscreteUniformSamplerGenerationPerformance.IntRange
The upper range for theint
generation.static class
DiscreteUniformSamplerGenerationPerformance.Sources
The benchmark state (retrieve the various "RandomSource"s).
-
Constructor Summary
Constructors Constructor Description DiscreteUniformSamplerGenerationPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
nextDiscreteUniformSampler(org.openjdk.jmh.infra.Blackhole bh, DiscreteUniformSamplerGenerationPerformance.Sources source, DiscreteUniformSamplerGenerationPerformance.IntRange range)
void
nextIntBaseline(org.openjdk.jmh.infra.Blackhole bh, DiscreteUniformSamplerGenerationPerformance.Sources source)
void
nextIntRange(org.openjdk.jmh.infra.Blackhole bh, DiscreteUniformSamplerGenerationPerformance.Sources source, DiscreteUniformSamplerGenerationPerformance.IntRange range)
-
-
-
Constructor Detail
-
DiscreteUniformSamplerGenerationPerformance
public DiscreteUniformSamplerGenerationPerformance()
-
-
Method Detail
-
nextIntBaseline
public void nextIntBaseline(org.openjdk.jmh.infra.Blackhole bh, DiscreteUniformSamplerGenerationPerformance.Sources source)
- Parameters:
bh
- the data sinksource
- the source
-
nextIntRange
public void nextIntRange(org.openjdk.jmh.infra.Blackhole bh, DiscreteUniformSamplerGenerationPerformance.Sources source, DiscreteUniformSamplerGenerationPerformance.IntRange range)
- Parameters:
bh
- the data sinksource
- the sourcerange
- the range
-
nextDiscreteUniformSampler
public void nextDiscreteUniformSampler(org.openjdk.jmh.infra.Blackhole bh, DiscreteUniformSamplerGenerationPerformance.Sources source, DiscreteUniformSamplerGenerationPerformance.IntRange range)
- Parameters:
bh
- the data sinksource
- the sourcerange
- the range
-
-