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 TypeMethodDescriptionlong
getValue()
Get the value this random variable always produces.next()
Get the next value for a random variable.void
setMaximum
(Long max, boolean closed) Set the maximum value for a random variable.void
setMinimum
(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, tightenMinimumS
Methods 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:RandomVariable
Set the minimum value for a random variable.- Specified by:
setMinimum
in interfaceRandomVariableOps<Long>
- Overrides:
setMinimum
in 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:RandomVariable
Set the maximum value for a random variable.- Specified by:
setMaximum
in interfaceRandomVariableOps<Long>
- Overrides:
setMaximum
in 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: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
-
toString
-