Class DistExponential

    • Constructor Detail

      • DistExponential

        public DistExponential​(StreamInterface stream,
                               double mean)
        constructs a new exponential function. The exponential distribution describes the interarrival times of entities to a system that occur randomly at a constant rate. The exponential distribution can also be characterized by this rate parameter λ; mean = 1 / λ.
        Parameters:
        stream - StreamInterface; the random number stream
        mean - double; the mean (mean > 0) value of the exponential distribution. The exponential distribution can also be characterized by the rate parameter λ; mean = 1 / λ
        Throws:
        IllegalArgumentException - in case mean <= 0
    • Method Detail

      • draw

        public double draw()
        draws the next stream value according to the probability of this this distribution.
        Specified by:
        draw in class DistContinuous
        Returns:
        the next double value drawn.
      • getProbabilityDensity

        public double getProbabilityDensity​(double x)
        returns the probability density value of a value x.
        Specified by:
        getProbabilityDensity in class DistContinuous
        Parameters:
        x - double; the value for which the density function needs to be calculated
        Returns:
        double; the probability density for value x
      • getMean

        public double getMean()
        Returns:
        mean