Module org.bzdev.math
Package org.bzdev.math.rv
Interface RandomVariableRVNOps<T extends Number,RV extends RandomVariableOps<T>>
- All Superinterfaces:
RandomVariableOps<RV>,RandomVariableRVOps<T,RV>
- All Known Implementing Classes:
BinomialDoubleRVRV,BinomialIATimeRVRV,BinomialIntegerRVRV,BinomialLongRVRV,DoubleRandomVariableRV,ExpDistrRVRV,FixedDoubleRVRV,FixedIATimeRVRV,FixedIntegerRVRV,FixedLongRVRV,GaussianIATimeRVRV,GaussianRVRV,IntegerRandomVariableRV,InterarrivalTimeRVRV,LogNormalRVRV,LongRandomVariableRV,PoissonDoubleRVRV,PoissonIATimeRVRV,PoissonIntegerRVRV,PoissonLongRVRV,RandomVariableRVN,UniformDoubleRVRV,UniformIATimeRVRV,UniformIntegerRVRV,UniformLongRVRV
public interface RandomVariableRVNOps<T extends Number,RV extends RandomVariableOps<T>>
extends RandomVariableRVOps<T,RV>
Interface for random variables that generates another random variable
that in turn generates numbers.
The type parameter T indicates the type of number and the type
parameter RV indicates the type of the random variable that generates
the number.
-
Method Summary
Modifier and TypeMethodDescriptionDetermine if a random variable's upper bound can be generated.Get the maximum value that will be set for random variables that the current object generates.Determine if a random variable's lower bound can be generated.Get the minimum value that will be set for random variables that the current object generates.next()Get the next value for a random variable.voidsetMaximum(T max, boolean closed) Set the maximum value for a random variable.voidsetMinimum(T min, boolean closed) Set the minimum value for a random variable.voidtightenMaximum(T max, boolean closed) Set the maximum value for a random variable, provided the new value is lower than the previous value.voidtightenMinimum(T min, boolean closed) Set the manimum value for a random variable, provided the new value is higher than the previous value.Methods inherited from interface org.bzdev.math.rv.RandomVariableOps
getMaximum, getMinimum, setMaximum, setMinimum, tightenMaximum, tightenMaximumS, tightenMinimum, tightenMinimumS
-
Method Details
-
getMinimumRV
T getMinimumRV()Get the minimum value that will be set for random variables that the current object generates.- Returns:
- the minimum value
-
getMaximumRV
T getMaximumRV()Get the maximum value that will be set for random variables that the current object generates.- Returns:
- the maximum value.
-
getMinimumClosed
Boolean getMinimumClosed()Determine if a random variable's lower bound can be generated. The value returned applies to the bound that will be set for the random numbers that this class generates.- Specified by:
getMinimumClosedin interfaceRandomVariableOps<T extends Number>- Returns:
- true if it can be generated; false if it cannot be generated; null if this cannot be determined
-
getMaximumClosed
Boolean getMaximumClosed()Determine if a random variable's upper bound can be generated. The value returned applies to the bound that will be set for the random numbers that this class generates.- Specified by:
getMaximumClosedin interfaceRandomVariableOps<T extends Number>- Returns:
- true if it can be generated; false if it cannot be generated; null if this cannot be determined
-
next
Get the next value for a random variable.- Specified by:
nextin interfaceRandomVariableOps<T extends Number>- Returns:
- the next value (a random variable)
- Throws:
RandomVariableException- a failure occurred while attempting to set a range restriction
-
setMinimum
void setMinimum(T min, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Set the minimum value for a random variable. The minimum value will be set for the random variable returned by a call tonext()- 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
void setMaximum(T max, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Set the maximum value for a random variable. The maximum value will be set for the random variable returned by a call tonext()- 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
-
tightenMinimum
void tightenMinimum(T min, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Set the manimum value for a random variable, provided the new value is higher than the previous value.- 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
-
tightenMaximum
void tightenMaximum(T max, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Set the maximum value for a random variable, provided the new value is lower than the previous value.- 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
-