Class DistDiscrete
- java.lang.Object
-
- nl.tudelft.simulation.jstats.distributions.Dist
-
- nl.tudelft.simulation.jstats.distributions.DistDiscrete
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DistBernoulli,DistBinomial,DistDiscreteConstant,DistDiscreteUniform,DistEmpiricalDiscreteLong,DistGeometric,DistNegBinomial,DistPoisson
public abstract class DistDiscrete extends Dist
The discrete distribution. For more information on this distribution see https://mathworld.wolfram.com/DiscreteDistribution.htmlCopyright (c) 2002-2023 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DistDiscrete(StreamInterface stream)constructs a new discrete distribution.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract longdraw()draws the next long from the stream.abstract doubleprobability(long observation)returns the probability of the observation in this particular distribution.
-
-
-
Constructor Detail
-
DistDiscrete
public DistDiscrete(StreamInterface stream)
constructs a new discrete distribution.- Parameters:
stream- StreamInterface; the random number stream
-
-
Method Detail
-
draw
public abstract long draw()
draws the next long from the stream.- Returns:
- long
-
probability
public abstract double probability(long observation)
returns the probability of the observation in this particular distribution.- Parameters:
observation- long; the discrete observation.- Returns:
- double the probability.
-
-