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 TypeMethodDescriptiondouble
getMean()
Get the mean value for the random-variable.double
getSDev()
Get the standard deviation for the random variable.next()
Get the next value.double
next
(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, tightenMinimumS
Methods 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:
next
in interfaceRandomVariableOps<Long>
- Specified by:
next
in 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
-