org.apache.commons.math3.random

## Class RandomGeneratorFactory

- java.lang.Object
- - org.apache.commons.math3.random.RandomGeneratorFactory

-     public class RandomGeneratorFactory
      extends Object

  Utilities for creating `RandomGenerator` instances.
  Since:
    3.3
  Version:
    $Id: RandomGeneratorFactory.java 1509230 2013-08-01 13:34:46Z erans $

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `convertToLong(int[] seed)` Converts seed from one representation to another.
    `static RandomGenerator` | `createRandomGenerator(Random rng)` Creates a `RandomDataGenerator` instance that wraps a `Random` instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createRandomGenerator

          public static RandomGenerator createRandomGenerator(Random rng)

      Creates a `RandomDataGenerator` instance that wraps a `Random` instance.
      Parameters:
        `rng` - JDK `Random` 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.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.