Package ons.util

Class Distribution

java.lang.Object
java.util.Random
ons.util.Distribution
All Implemented Interfaces:
java.io.Serializable

public class Distribution
extends java.util.Random
Extends Java Random Class in order to provide good random number sequences.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Distribution()  
    Distribution​(int seq_num, int seed_num)
    Distribution setup interface.
    Distribution​(long seed)
    Creates a new Distribution object, which is nothing more than a random number generator.
  • Method Summary

    Modifier and Type Method Description
    double nextExponential​(double b)
    Exponential distribution.

    Methods inherited from class java.util.Random

    doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Distribution

      public Distribution()
    • Distribution

      public Distribution​(long seed)
      Creates a new Distribution object, which is nothing more than a random number generator.
      Parameters:
      seed - initial value of the internal state of the pseudo-random number generator
    • Distribution

      public Distribution​(int seq_num, int seed_num)
      Distribution setup interface. Generate up to 25 good seeds for up to 4 parallel sequences.
      Parameters:
      seq_num - 1..4 sequence number
      seed_num - 1..25 seed number
  • Method Details

    • nextExponential

      public double nextExponential​(double b)
      Exponential distribution.
      Parameters:
      b -
      Returns:
      next value of the Exponential distribution