java.lang.Object
org.bzdev.math.rv.RandomVariable<Long>
org.bzdev.math.rv.LongRandomVariable
org.bzdev.math.rv.UniformLongRV
- All Implemented Interfaces:
Cloneable
,RandomVariableOps<Long>
Random variable that generates a long with uniform probability
over a range of values.
-
Constructor Summary
ConstructorsConstructorDescriptionUniformLongRV
(long lowerLimit, boolean lowerClosed, long upperLimit, boolean upperClosed) Constructor specifying range type (open, closed, etc.).UniformLongRV
(long lowerLimit, long upperLimit) Constructor. -
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
-
UniformLongRV
public UniformLongRV(long lowerLimit, long upperLimit) Constructor. The values produced are in the range [lowerLimit, upperLimit).- Parameters:
lowerLimit
- the lower limit of the values producedupperLimit
- the upper limit of the values produced
-
UniformLongRV
public UniformLongRV(long lowerLimit, boolean lowerClosed, long upperLimit, boolean upperClosed) Constructor specifying range type (open, closed, etc.).- Parameters:
lowerLimit
- the lower limit of the values producedlowerClosed
- true if the lower limit is included in the range of values produced; false otherwiseupperLimit
- the upper limit of the values producedupperClosed
- true if the upper limit is included in the range of values produced; false otherwise
-
-
Method Details
-
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
-