public final class RandomManager extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.math3.random.RandomGenerator |
getRandom() |
static org.apache.commons.math3.random.RandomGenerator |
getRandom(long seed) |
static void |
useTestSeed()
Only call in test code. Causes all known instances of
RandomGenerator ,
and future ones, to be started from a fixed seed. |
public static org.apache.commons.math3.random.RandomGenerator getRandom()
RandomGenerator
public static org.apache.commons.math3.random.RandomGenerator getRandom(long seed)
seed
- explicit seed for random number generatorRandomGenerator
public static void useTestSeed()
RandomGenerator
,
and future ones, to be started from a fixed seed. This is useful for making
tests deterministic.Copyright © 2014–2018. All rights reserved.