Class GeometricSamplersPerformance
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.sampling.distribution.GeometricSamplersPerformance
-
public class GeometricSamplersPerformance extends Object
Executes a benchmark to compare the speed of generation of Geometric random numbers using different methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeometricSamplersPerformance.Sources
The samplers's to use for testing.
-
Constructor Summary
Constructors Constructor Description GeometricSamplersPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
baseline()
Baseline for the JMH timing overhead for production of anint
value.int
sample(GeometricSamplersPerformance.Sources sources)
Run the sampler.
-
-
-
Constructor Detail
-
GeometricSamplersPerformance
public GeometricSamplersPerformance()
-
-
Method Detail
-
baseline
public int baseline()
Baseline for the JMH timing overhead for production of anint
value.- Returns:
- the
int
value
-
sample
public int sample(GeometricSamplersPerformance.Sources sources)
Run the sampler.- Parameters:
sources
- Source of randomness.- Returns:
- the sample value
-
-