org.encog.mathutil.randomize.generate

## Class AbstractGenerateRandom

- java.lang.Object
- - org.encog.mathutil.randomize.generate.AbstractGenerateRandom

- All Implemented Interfaces:
    GenerateRandom
  Direct Known Subclasses:
    AbstractBoxMuller, BasicGenerateRandom, SecureGenerateRandom

      public abstract class AbstractGenerateRandom
      extends Object
      implements GenerateRandom

  Provides a foundation for most random number generation. This allows the nextDouble to generate the other types.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractGenerateRandom()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `nextDouble(double high)` The next random double up to a non-inclusive range.
    `double` | `nextDouble(double low, double high)` The next double between low (inclusive) and high (exclusive).
    `int` | `nextInt(int range)` The next random int up to a non-inclusive range.
    `int` | `nextInt(int low, int high)` The next int between low (inclusive) and high (exclusive).

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

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

    - ### Methods inherited from interface org.encog.mathutil.randomize.generate.GenerateRandom

      `nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextLong`

- - ### Constructor Detail

    - #### AbstractGenerateRandom

          public AbstractGenerateRandom()

  - ### Method Detail

    - #### nextInt

          public int nextInt(int low,
                    int high)

      The next int between low (inclusive) and high (exclusive).
      Specified by:
        `nextInt` in interface `GenerateRandom`
      Parameters:
        `low` - The inclusive low value.
        `high` - The exclusive high value.
      Returns:
        The result.

    - #### nextDouble

          public double nextDouble(double high)

      The next random double up to a non-inclusive range.
      Specified by:
        `nextDouble` in interface `GenerateRandom`
      Parameters:
        `high` - The highest desired value.
      Returns:
        The result.

    - #### nextDouble

          public double nextDouble(double low,
                          double high)

      The next double between low (inclusive) and high (exclusive).
      Specified by:
        `nextDouble` in interface `GenerateRandom`
      Parameters:
        `low` - The inclusive low value.
        `high` - The exclusive high value.
      Returns:
        The result.

    - #### nextInt

          public int nextInt(int range)

      The next random int up to a non-inclusive range.
      Specified by:
        `nextInt` in interface `GenerateRandom`
      Parameters:
        `range` - The highest desired value.
      Returns:
        The result.

Copyright © 2014. All Rights Reserved.