Class JumpBenchmark.ArbitrarilyJumpableSource
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.core.JumpBenchmark.BaseJumpableSource
-
- org.apache.commons.rng.examples.jmh.core.JumpBenchmark.ArbitrarilyJumpableSource
-
- Enclosing class:
- JumpBenchmark
public static class JumpBenchmark.ArbitrarilyJumpableSource extends JumpBenchmark.BaseJumpableSource
Exercise theArbitrarilyJumpableUniformRandomProvider.jump(double)function, or theArbitrarilyJumpableUniformRandomProvider.jumpPowerOfTwo(int)function.The power-of-two jump function is called if the distance is an exact
intvalue.To jump a small arbitrary amount specify the distance with a fractional component, e.g. jump 123 using 123.5, otherwise a power-of-2 jump of 123 will be called.
-
-
Constructor Summary
Constructors Constructor Description ArbitrarilyJumpableSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Supplier<org.apache.commons.rng.UniformRandomProvider>createJumpFunction()Creates the jump function.-
Methods inherited from class org.apache.commons.rng.examples.jmh.core.JumpBenchmark.BaseJumpableSource
setup
-
-
-
-
Constructor Detail
-
ArbitrarilyJumpableSource
public ArbitrarilyJumpableSource()
-
-
Method Detail
-
createJumpFunction
protected Supplier<org.apache.commons.rng.UniformRandomProvider> createJumpFunction()
Creates the jump function. The jump will copy the RNG and then move forward the state of the source RNG by a large number of steps. The copy is returned.- Specified by:
createJumpFunctionin classJumpBenchmark.BaseJumpableSource- Returns:
- the copy RNG
-
-