be.ac.ulg.montefiore.run.totem.util.distribution
Class UniformIntDistribution

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.util.distribution.UniformIntDistribution
All Implemented Interfaces:
Distribution

public class UniformIntDistribution
extends java.lang.Object
implements Distribution

This class implements a uniform integer distribution.

Creation date: 1-Jan-2004

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Constructor Summary
UniformIntDistribution(long lower, long upper)
          Initialises a newly created UniformIntDistribution object.
 
Method Summary
 double generate()
          Returns a double value according to the uniform integer distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformIntDistribution

public UniformIntDistribution(long lower,
                              long upper)
Initialises a newly created UniformIntDistribution object.

Parameters:
lower - The lowest value this object must return.
upper - The highest value this object must return.
Throws:
java.lang.IllegalArgumentException - If lower is >= than upper.
Method Detail

generate

public double generate()
Returns a double value according to the uniform integer distribution.

Specified by:
generate in interface Distribution


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.