Class TriangleSamplerBenchmark.Sampler3D
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.sampling.shape.TriangleSamplerBenchmark.SamplerData
-
- org.apache.commons.rng.examples.jmh.sampling.shape.TriangleSamplerBenchmark.Sampler3D
-
- Enclosing class:
- TriangleSamplerBenchmark
public static class TriangleSamplerBenchmark.Sampler3D extends TriangleSamplerBenchmark.SamplerData
The 3D triangle sampler.
-
-
Constructor Summary
Constructors Constructor Description Sampler3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectSampler<double[]>
createSampler(org.apache.commons.rng.UniformRandomProvider rng, double[] a, double[] b, double[] c)
Creates the triangle sampler.protected int
getDimension()
Gets the dimension of the triangle vertices.-
Methods inherited from class org.apache.commons.rng.examples.jmh.sampling.shape.TriangleSamplerBenchmark.SamplerData
getSampler, getSize, setup
-
-
-
-
Constructor Detail
-
Sampler3D
public Sampler3D()
-
-
Method Detail
-
getDimension
protected int getDimension()
Gets the dimension of the triangle vertices.- Specified by:
getDimension
in classTriangleSamplerBenchmark.SamplerData
- Returns:
- the dimension
-
createSampler
protected ObjectSampler<double[]> createSampler(org.apache.commons.rng.UniformRandomProvider rng, double[] a, double[] b, double[] c)
Creates the triangle sampler.- Specified by:
createSampler
in classTriangleSamplerBenchmark.SamplerData
- Parameters:
rng
- the source of randomnessa
- The first vertex.b
- The second vertex.c
- The third vertex.- Returns:
- the sampler
-
-