java.lang.Object
org.bzdev.math.rv.RandomVariable<Long>
org.bzdev.math.rv.LongRandomVariable
org.bzdev.math.rv.InterarrivalTimeRV
org.bzdev.math.rv.PoissonIATimeRV
- All Implemented Interfaces:
Cloneable
,RandomVariableOps<Long>
Class for exponentially distributed interarrival times suitable for
events with a Poisson distribution.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bzdev.math.rv.LongRandomVariable
getMaximum, getMaximumClosed, getMinimum, getMinimumClosed, parallelStream, parallelStream, rangeTestFailed, rangeTestNeeded, setMaximum, setMinimum, setRequiredMaximum, setRequiredMinimum, spliterator, spliterator, stream, stream, tightenMaximum, tightenMaximumS, tightenMinimum, tightenMinimumS
Methods inherited from class org.bzdev.math.rv.RandomVariable
clone, getCharacteristics
-
Constructor Details
-
PoissonIATimeRV
Constructor.- Parameters:
mean
- the mean value for the random variable- Throws:
IllegalArgumentException
-
-
Method Details
-
getMean
public double getMean()Get the mean value of the distribution.- Returns:
- the mean value of the distribution
-
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 interfaceRandomVariableOps<Long>
- Specified by:
next
in classRandomVariable<Long>
- Returns:
- the next value
-
next
Get a random number that represents the sum of n interarrival times for a Poisson process. 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
-