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 classGeometricSamplersPerformance.SourcesThe 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 intbaseline()Baseline for the JMH timing overhead for production of anintvalue.intsample(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 anintvalue.- Returns:
- the
intvalue
-
sample
public int sample(GeometricSamplersPerformance.Sources sources)
Run the sampler.- Parameters:
sources- Source of randomness.- Returns:
- the sample value
-
-