WDMSim

wdmsim.util
Class Distribution

java.lang.Object
  extended by java.util.Random
      extended by wdmsim.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.

Author:
andred
See Also:
Serialized Form

Constructor Summary
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
 double nextExponential(double b)
          Exponential distribution.
 
Methods inherited from class java.util.Random
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 Detail

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 Detail

nextExponential

public double nextExponential(double b)
Exponential distribution.

Parameters:
b -
Returns:
next value of the Exponential distribution

WDMSim