be.ac.ulg.montefiore.run.totem.util.distribution
Class PoissonDistribution
java.lang.Object
be.ac.ulg.montefiore.run.totem.util.distribution.PoissonDistribution
- All Implemented Interfaces:
- Distribution
public class PoissonDistribution
- extends java.lang.Object
- implements Distribution
This class implements a Poisson distribution using an acceptance-rejection
technique if the mean is lower than THRESHOLD. If the mean is >= than
THRESHOLD, we use an approximation by a Normal distribution (because the
acceptance-rejection technique becomes costly).
See "Discrete-Event System Simulation", Second Edition, Jerry BANKS,
John S. Carson, II, Barry L.Nelson, pp 345-348, 1999, Prentice Hall.
Creation date: 1-Jan-2004
- Author:
- Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)
Constructor Summary |
PoissonDistribution(double mean)
Initialises a newly created PoissonDistribution object. |
Method Summary |
double |
generate()
Returns a double value according to the Poisson
distribution. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THRESHOLD
public static final int THRESHOLD
- See Also:
- Constant Field Values
PoissonDistribution
public PoissonDistribution(double mean)
- Initialises a newly created
PoissonDistribution
object.
- Parameters:
mean
- The mean of the Poisson distribution.
- Throws:
java.lang.IllegalArgumentException
- If the mean is <= 0.
generate
public double generate()
- Returns a
double
value according to the Poisson
distribution.
- Specified by:
generate
in interface Distribution
Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.