Module org.bzdev.obnaming
Package org.bzdev.obnaming
Interface NamedRandomVariableOps<T,RV extends RandomVariable<T>>
- All Superinterfaces:
NamedObjectOps
,RandomVariableOps<T>
- All Known Implementing Classes:
SimBinomialBooleanRV
,SimBinomialBooleanRVRV
,SimBinomialDoubleRV
,SimBinomialDoubleRVRV
,SimBinomialIATimeRV
,SimBinomialIATimeRVRV
,SimBinomialIntegerRV
,SimBinomialIntegerRVRV
,SimBinomialLongRV
,SimBinomialLongRVRV
,SimBooleanRV
,SimBooleanRVRV
,SimDetermBooleanRV
,SimDetermDoubleRV
,SimDetermIATimeRV
,SimDetermIntegerRV
,SimDetermLongRV
,SimDoubleRV
,SimDoubleRVRV
,SimExpDistrRV
,SimExpDistrRVRV
,SimFixedBooleanRV
,SimFixedBooleanRVRV
,SimFixedDoubleRV
,SimFixedDoubleRVRV
,SimFixedIATimeRV
,SimFixedIATimeRVRV
,SimFixedIntegerRV
,SimFixedIntegerRVRV
,SimFixedLongRV
,SimFixedLongRVRV
,SimGaussianIATimeRV
,SimGaussianIATimeRVRV
,SimGaussianRV
,SimGaussianRVRV
,SimIntegerRV
,SimIntegerRVRV
,SimInterarrivalTimeRV
,SimInterarrivalTimeRVRV
,SimLogNormalRV
,SimLogNormalRVRV
,SimLongRV
,SimLongRVRV
,SimPoissonDoubleRV
,SimPoissonDoubleRVRV
,SimPoissonIATimeRV
,SimPoissonIATimeRVRV
,SimPoissonIntegerRV
,SimPoissonIntegerRVRV
,SimPoissonLongRV
,SimPoissonLongRVRV
,SimRandomVariable
,SimRandomVariableRV
,SimRandomVariableRVN
,SimUniformBooleanRV
,SimUniformDoubleRV
,SimUniformDoubleRVRV
,SimUniformIATimeRV
,SimUniformIATimeRVRV
,SimUniformIntegerRV
,SimUniformIntegerRVRV
,SimUniformLongRV
,SimUniformLongRVRV
public interface NamedRandomVariableOps<T,RV extends RandomVariable<T>>
extends RandomVariableOps<T>, NamedObjectOps
Interface for named objects that provide a random variable.
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
Get the upper bound on the values that can be generated.default Boolean
Determine if a random variable's upper bound can be generated.default T
Get the lower bound on the values that can be generated.default Boolean
Determine if a random variable's lower bound can be generated.Get the random variable that this class names.default T
next()
Get the next value for a random variable.default void
setMaximum
(T max, boolean closed) Set the maximum value for a random variable.default void
setMinimum
(T min, boolean closed) Set the minimum value for a random variable.default void
tightenMaximum
(T max, boolean closed) Tighten the maximum value for a random variable.default void
tightenMaximumS
(String max, boolean closed) Tighten the maximum value for a random variable given a string.default void
tightenMinimum
(T min, boolean closed) Tighten the minimum value for a random variable.default void
tightenMinimumS
(String min, boolean closed) Tighten the minimum value for a random variable given a string.Methods inherited from interface org.bzdev.obnaming.NamedObjectOps
canDelete, delete, deletePending, getName, isDeleted, isInterned
-
Method Details
-
getRandomVariable
RV getRandomVariable()Get the random variable that this class names.- Returns:
- the random variable
-
setMinimum
default void setMinimum(T min, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from interface:RandomVariableOps
Set the minimum value for a random variable.- Specified by:
setMinimum
in interfaceRandomVariableOps<T>
- 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
-
tightenMinimum
default void tightenMinimum(T min, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from interface:RandomVariableOps
Tighten the minimum value for a random variable. If there is no minimum value, it will be set. Otherwise the minimum of the allowed range will not decrease.- Specified by:
tightenMinimum
in interfaceRandomVariableOps<T>
- 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
-
tightenMinimumS
default void tightenMinimumS(String min, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from interface:RandomVariableOps
Tighten the minimum value for a random variable given a string. If there is no minimum value, it will be set. Otherwise the minimum of the allowed range will not decrease. The string argument is a number in a format acceptable to the constructors for Integer, Long, or Double as appropriate.- Specified by:
tightenMinimumS
in interfaceRandomVariableOps<T>
- 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
default void setMaximum(T max, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from interface:RandomVariableOps
Set the maximum value for a random variable.- Specified by:
setMaximum
in interfaceRandomVariableOps<T>
- 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
-
tightenMaximum
default void tightenMaximum(T max, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from interface:RandomVariableOps
Tighten the maximum value for a random variable. If there is no maximum value, it will be set. Otherwise the maximum of the allowed range will not increase.- Specified by:
tightenMaximum
in interfaceRandomVariableOps<T>
- 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
-
tightenMaximumS
default void tightenMaximumS(String max, boolean closed) throws UnsupportedOperationException, IllegalArgumentException Description copied from interface:RandomVariableOps
Tighten the maximum value for a random variable given a string. If there is no maximum value, it will be set. Otherwise the maximum of the allowed range will not increase. The string argument is a number in a format acceptable to the constructors for Integer, Long, or Double as appropriate.- Specified by:
tightenMaximumS
in interfaceRandomVariableOps<T>
- 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 interface:RandomVariableOps
Get the next value for a random variable. In general, each value will be independent of the last.- Specified by:
next
in interfaceRandomVariableOps<T>
- Returns:
- the next value
- Throws:
RandomVariableException
- if the next value could not be generated
-
getMinimum
Description copied from interface:RandomVariableOps
Get the lower bound on the values that can be generated. Some random numbers do not have an ordering, so that null will always be returned in that case.- Specified by:
getMinimum
in interfaceRandomVariableOps<T>
- Returns:
- the lower bound; null if there is none
-
getMinimumClosed
Description copied from interface:RandomVariableOps
Determine if a random variable's lower bound can be generated.- Specified by:
getMinimumClosed
in interfaceRandomVariableOps<T>
- Returns:
- true if it can be generated; false if it cannot be generated; null if this cannot be determined
-
getMaximum
Description copied from interface:RandomVariableOps
Get the upper bound on the values that can be generated. Some random numbers do not have an ordering, so that null will always be returned in that case.- Specified by:
getMaximum
in interfaceRandomVariableOps<T>
- Returns:
- the upper bound; null if there is none
-
getMaximumClosed
Description copied from interface:RandomVariableOps
Determine if a random variable's upper bound can be generated.- Specified by:
getMaximumClosed
in interfaceRandomVariableOps<T>
- Returns:
- true if it can be generated; false if it cannot be generated; null if this cannot be determined
-