Class ExpDistrRV

All Implemented Interfaces:
Cloneable, RandomVariableOps<Double>

public class ExpDistrRV extends DoubleRandomVariable
Class for exponentially distributed interarrival times suitable for events with a Poisson distribution.
  • Constructor Details

  • Method Details

    • getMean

      public double getMean()
      Get the mean value of the distribution.
      Returns:
      the mean value of the distribution
    • next

      public Double next()
      Description copied from class: RandomVariable
      Get the next value for a random variable. In general, each value will be independent of the last.
      Specified by:
      next in interface RandomVariableOps<Double>
      Specified by:
      next in class RandomVariable<Double>
      Returns:
      the next value
    • next

      public Double next(int n)
      Get a random number that represents the sum of n interarrival times for an exponentially distributed random variable, where each value is independent of another. The implementation is more efficient than adding the results of calling next() n times. The range test (if any) tests the returned value divided by n.
      Parameters:
      n - the number of interarrival times to sum
      Returns:
      the sum of n values of this random variable