java.lang.Object
org.bzdev.math.rv.RandomVariable<Long>
org.bzdev.math.rv.LongRandomVariable
org.bzdev.math.rv.InterarrivalTimeRV
org.bzdev.math.rv.GaussianIATimeRV
- All Implemented Interfaces:
Cloneable,RandomVariableOps<Long>
Random variable with a Gaussian distribution.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetMean()Get the mean value for the random-variable.doublegetSDev()Get the standard deviation for the random variable.next()Get the next value.doublenext(int n) Get the sum of multiple values with the number of values an int.next(long n) Get the sum of multiple values with the number of values a long.toString()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, tightenMinimumSMethods inherited from class org.bzdev.math.rv.RandomVariable
clone, getCharacteristics
-
Constructor Details
-
GaussianIATimeRV
public GaussianIATimeRV(double mean, double sdev) Constructor.- Parameters:
mean- the mean value of this random variablesdev- the standard deviation of this random variable
-
-
Method Details
-
getMean
public double getMean()Get the mean value for the random-variable.- Returns:
- the mean value
-
getSDev
public double getSDev()Get the standard deviation for the random variable.- Returns:
- the standard deviation
-
next
Get the next value.- Specified by:
nextin interfaceRandomVariableOps<Long>- Specified by:
nextin classRandomVariable<Long>- Returns:
- the next value, rounded to the nearest long integer
-
next
public double next(int n) Get the sum of multiple values with the number of values an int. The range check, if any, is applied to the result, not the individual random values that were summed. The implementation is more efficient than one that calls next() n times.- Parameters:
n- the number of values to use- Returns:
- the sum of n values of this random variable
-
next
Get the sum of multiple values with the number of values a long. The range check, if any, is applied to the result, not the individual random values that were summed. The implementation is more efficient than one that calls next() n times.- Parameters:
n- the number of values to use- Returns:
- the sum of n values of this random variable
-
toString
-