Class DistEmpiricalDiscreteDouble
java.lang.Object
nl.tudelft.simulation.jstats.distributions.Dist
nl.tudelft.simulation.jstats.distributions.DistContinuous
nl.tudelft.simulation.jstats.distributions.DistEmpiricalDiscreteDouble
The empirical distribution is a distribution where the information is stored in an EmpiricalDistribution, consisting of pairs
of values and cumulative probabilities.
Note that interpolated is false for the EmpiricalDistribution to be used in this class, so the function in essence behaves as a discrete distribution, albeit with double values as the outcome. The probability density function returns the equivalent of the discrete distribution function; of course the real probability density function from the viewpoint of a continuous distribution does not exist.
Note that interpolated is false for the EmpiricalDistribution to be used in this class, so the function in essence behaves as a discrete distribution, albeit with double values as the outcome. The probability density function returns the equivalent of the discrete distribution function; of course the real probability density function from the viewpoint of a continuous distribution does not exist.
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:
- Alexander Verbraeck
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDistEmpiricalDiscreteDouble(StreamInterface stream, DiscreteEmpiricalDistribution empiricalDistribution) constructs a new DistEmpirical. -
Method Summary
Modifier and TypeMethodDescriptiondoubledraw()draws the next stream value according to the probability of this this distribution.doublegetProbabilityDensity(double x) returns the probability density value of a value x.
-
Constructor Details
-
DistEmpiricalDiscreteDouble
public DistEmpiricalDiscreteDouble(StreamInterface stream, DiscreteEmpiricalDistribution empiricalDistribution) constructs a new DistEmpirical.- Parameters:
stream- the stream to useempiricalDistribution- the cumulative distribution to use
-
-
Method Details
-
draw
public double draw()Description copied from class:DistContinuousdraws the next stream value according to the probability of this this distribution.- Specified by:
drawin classDistContinuous- Returns:
- the next double value drawn.
-
getProbabilityDensity
public double getProbabilityDensity(double x) Description copied from class:DistContinuousreturns the probability density value of a value x.- Specified by:
getProbabilityDensityin classDistContinuous- Parameters:
x- the value for which the density function needs to be calculated- Returns:
- the probability density for value x
-