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.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:
  • Constructor Details

    • DistDiscrete

      public DistDiscrete(StreamInterface stream)
      constructs a new discrete distribution.
      Parameters:
      stream - StreamInterface; 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 - long; the discrete observation.
      Returns:
      double the probability.