Class DistDiscrete
java.lang.Object
nl.tudelft.simulation.jstats.distributions.Dist
nl.tudelft.simulation.jstats.distributions.DistDiscrete
- Direct Known Subclasses:
DistBernoulli,DistBinomial,DistDiscreteConstant,DistDiscreteUniform,DistEmpiricalDiscreteLong,DistGeometric,DistNegBinomial,DistPoisson
The discrete distribution. For more information on this distribution see
https://mathworld.wolfram.com/DiscreteDistribution.html
Copyright (c) 2002-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
- Author:
- Peter Jacobs , Alexander Verbraeck
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDistDiscrete(StreamInterface stream) constructs a new discrete distribution. -
Method Summary
Modifier and TypeMethodDescriptionabstract longdraw()draws the next long from the stream.abstract doubleprobability(long observation) returns the probability of the observation in this particular distribution.
-
Constructor Details
-
DistDiscrete
constructs a new discrete distribution.- Parameters:
stream- the random number stream
-
-
Method Details
-
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- the discrete observation.- Returns:
- double the probability.
-