Class DistPoisson
java.lang.Object
nl.tudelft.simulation.jstats.distributions.Dist
nl.tudelft.simulation.jstats.distributions.DistDiscrete
nl.tudelft.simulation.jstats.distributions.DistPoisson
- All Implemented Interfaces:
Serializable
The Poisson distribution. For more information on this distribution see
https://mathworld.wolfram.com/PoissonDistribution.html
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Peter Jacobs , Alexander Verbraeck
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDistPoisson(StreamInterface stream, double lambda) constructs a new Poisson distribution. -
Method Summary
Modifier and TypeMethodDescriptionlongdraw()draws the next long from the stream.doubledoubleprobability(long observation) returns the probability of the observation in this particular distribution.toString()
-
Constructor Details
-
DistPoisson
constructs a new Poisson distribution.- Parameters:
stream- StreamInterface; the random number streamlambda- double; the lambda parameter- Throws:
IllegalArgumentException- when lambda <= 0
-
-
Method Details
-
draw
public long draw()draws the next long from the stream.- Specified by:
drawin classDistDiscrete- Returns:
- long
-
probability
public double probability(long observation) returns the probability of the observation in this particular distribution.- Specified by:
probabilityin classDistDiscrete- Parameters:
observation- long; the discrete observation.- Returns:
- double the probability.
-
getLambda
public double getLambda()- Returns:
- lambda
-
toString
-