Class UnitSphereSamplerBenchmark.SamplerData
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.sampling.UnitSphereSamplerBenchmark.SamplerData
-
- Direct Known Subclasses:
UnitSphereSamplerBenchmark.Sampler1D
,UnitSphereSamplerBenchmark.Sampler2D
,UnitSphereSamplerBenchmark.Sampler3D
,UnitSphereSamplerBenchmark.Sampler4D
- Enclosing class:
- UnitSphereSamplerBenchmark
public abstract static class UnitSphereSamplerBenchmark.SamplerData extends Object
Base class for the sampler data. Contains the source of randomness and the number of samples. The sampler should be created by a sub-class of the data.
-
-
Constructor Summary
Constructors Constructor Description SamplerData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ObjectSampler<double[]>
createSampler(org.apache.commons.rng.UniformRandomProvider rng)
Creates the sampler.ObjectSampler<double[]>
getSampler()
Gets the sampler.int
getSize()
Gets the size.void
setup()
Create the source of randomness.
-
-
-
Constructor Detail
-
SamplerData
public SamplerData()
-
-
Method Detail
-
getSize
public int getSize()
Gets the size.- Returns:
- the size
-
getSampler
public ObjectSampler<double[]> getSampler()
Gets the sampler.- Returns:
- the sampler
-
setup
public void setup()
Create the source of randomness.
-
createSampler
protected abstract ObjectSampler<double[]> createSampler(org.apache.commons.rng.UniformRandomProvider rng)
Creates the sampler.- Parameters:
rng
- the source of randomness- Returns:
- the sampler
-
-