Documentation of 'edu.rit.numeric.ExponentialPrng' Java class
ExponentialPrng
edu.rit.numeric

Class ExponentialPrng



  • public class ExponentialPrng
    extends DoublePrng
    Class ExponentialPrng provides a pseudorandom number generator (PRNG) that generates random numbers with an exponential distribution. The probability density function is
        f(x) = λeλx, x ≥ 0
        f(x) = 0, otherwise
    The distribution's mean is 1/λ and its standard deviation is 1/λ2.

    An exponential distribution is often used to model arrivals or departures in a discrete event simulation. The mean arrival or departure rate is λ; the mean interarrival or interdeparture time is 1/λ.

    Every call of the next() method results in one call of the underlying uniform PRNG's nextDouble() method.

    • Constructor Summary

      Constructors 
      Constructor and Description
      ExponentialPrng(Random theUniformPrng, double lambda)
      Construct a new exponential PRNG.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double next()
      Returns the next random number.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExponentialPrng

        public ExponentialPrng(Random theUniformPrng,
                               double lambda)
        Construct a new exponential PRNG.
        Parameters:
        theUniformPrng - The underlying uniform PRNG.
        lambda - Mean rate λ > 0.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theUniformPrng is null.
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if λ ≤ 0.
    • Method Detail

      • next

        public double next()
        Returns the next random number.
        Specified by:
        next in class DoublePrng
        Returns:
        Random number.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.