Top Description Constructors Methods
org.apache.commons.math3.random

public Class RandomGeneratorFactory

extends Object
Class Inheritance
Imports
java.util.Random, org.apache.commons.math3.exception.NotStrictlyPositiveException

Utilities for creating RandomGenerator instances.
Since
3.3

Constructor Summary

AccessConstructor and Description
private
RandomGeneratorFactory()

Class contains only static methods.

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

the converted seed.
convertToLong
(int[]
Original seed.
seed
)

Converts seed from one representation to another.

public static RandomGenerator

Returns:

the given RNG, wrapped in a RandomGenerator.
createRandomGenerator
(final Random
JDK Random instance that will generate the the random data.
rng
)

Creates a RandomDataGenerator instance that wraps a Random instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RandomGeneratorFactoryback to summary
private RandomGeneratorFactory()

Class contains only static methods.

Method Detail

convertToLongback to summary
public static long convertToLong(int[] seed)

Converts seed from one representation to another.

Parameters
seed:int[]

Original seed.

Returns:long

the converted seed.

createRandomGeneratorback to summary
public static RandomGenerator createRandomGenerator(final Random rng)

Creates a RandomDataGenerator instance that wraps a Random instance.

Parameters
rng:Random

JDK Random instance that will generate the the random data.

Returns:RandomGenerator

the given RNG, wrapped in a RandomGenerator.