java.lang.Object
org.bzdev.math.rv.RandomVariable<Long>
org.bzdev.math.rv.LongRandomVariable
org.bzdev.math.rv.InterarrivalTimeRV
org.bzdev.math.rv.FixedIATimeRV
- All Implemented Interfaces:
Cloneable,RandomVariableOps<Long>
Random variable that always generates the same interarrival time.
Useful when passing a constant to a method that expects a
random variable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetValue()Get the value this random variable always produces.next()Get the next value for a random variable.voidsetMaximum(Long max, boolean closed) Set the maximum value for a random variable.voidsetMinimum(Long min, boolean closed) Set the minimum value for a random variable.toString()Methods inherited from class org.bzdev.math.rv.LongRandomVariable
getMaximum, getMaximumClosed, getMinimum, getMinimumClosed, parallelStream, parallelStream, rangeTestFailed, rangeTestNeeded, setRequiredMaximum, setRequiredMinimum, spliterator, spliterator, stream, stream, tightenMaximum, tightenMaximumS, tightenMinimum, tightenMinimumSMethods inherited from class org.bzdev.math.rv.RandomVariable
clone, getCharacteristics
-
Constructor Details
-
FixedIATimeRV
Constructor.- Parameters:
value- the value of the random variable- Throws:
IllegalArgumentException
-
-
Method Details
-
getValue
public long getValue()Get the value this random variable always produces.- Returns:
- the value
-
setMinimum
public void setMinimum(Long min, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from class:RandomVariableSet the minimum value for a random variable.- Specified by:
setMinimumin interfaceRandomVariableOps<Long>- Overrides:
setMinimumin classLongRandomVariable- Parameters:
min- minimum value.closed- true if the minimum value is part of the range; false if it is a lower bound on the range- Throws:
UnsupportedOperationException- the random variable's type does not have an order imposed on it or the operation is not supported for implementation reasonsIllegalArgumentException- an argument is out of range
-
setMaximum
public void setMaximum(Long max, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from class:RandomVariableSet the maximum value for a random variable.- Specified by:
setMaximumin interfaceRandomVariableOps<Long>- Overrides:
setMaximumin classLongRandomVariable- Parameters:
max- maximum value.closed- true if the minimum value is part of the range; false if it is a lower bound on the range- Throws:
UnsupportedOperationException- the random variable's type does not have an order imposed on it or the operation is not supported for implementation reasonsIllegalArgumentException- an argument is out of range
-
next
Description copied from class:RandomVariableGet the next value for a random variable. In general, each value will be independent of the last.- Specified by:
nextin interfaceRandomVariableOps<Long>- Specified by:
nextin classRandomVariable<Long>- Returns:
- the next value
-
toString
-