Package org.apache.commons.math3.random
Class RandomGeneratorFactory
- java.lang.Object
-
- org.apache.commons.math3.random.RandomGeneratorFactory
-
public class RandomGeneratorFactory extends Object
Utilities for creatingRandomGenerator
instances.- Since:
- 3.3
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
convertToLong(int[] seed)
Converts seed from one representation to another.static RandomGenerator
createRandomGenerator(Random rng)
Creates aRandomDataGenerator
instance that wraps aRandom
instance.
-
-
-
Method Detail
-
createRandomGenerator
public static RandomGenerator createRandomGenerator(Random rng)
Creates aRandomDataGenerator
instance that wraps aRandom
instance.- Parameters:
rng
- JDKRandom
instance that will generate the the random data.- Returns:
- the given RNG, wrapped in a
RandomGenerator
.
-
convertToLong
public static long convertToLong(int[] seed)
Converts seed from one representation to another.- Parameters:
seed
- Original seed.- Returns:
- the converted seed.
-
-