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 TGet the upper bound on the values that can be generated.default BooleanDetermine if a random variable's upper bound can be generated.default TGet the lower bound on the values that can be generated.default BooleanDetermine if a random variable's lower bound can be generated.Get the random variable that this class names.default Tnext()Get the next value for a random variable.default voidsetMaximum(T max, boolean closed) Set the maximum value for a random variable.default voidsetMinimum(T min, boolean closed) Set the minimum value for a random variable.default voidtightenMaximum(T max, boolean closed) Tighten the maximum value for a random variable.default voidtightenMaximumS(String max, boolean closed) Tighten the maximum value for a random variable given a string.default voidtightenMinimum(T min, boolean closed) Tighten the minimum value for a random variable.default voidtightenMinimumS(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:RandomVariableOpsSet the minimum value for a random variable.- Specified by:
setMinimumin 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:RandomVariableOpsTighten 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:
tightenMinimumin 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:RandomVariableOpsTighten 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:
tightenMinimumSin 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:RandomVariableOpsSet the maximum value for a random variable.- Specified by:
setMaximumin 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:RandomVariableOpsTighten 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:
tightenMaximumin 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:RandomVariableOpsTighten 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:
tightenMaximumSin 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:RandomVariableOpsGet the next value for a random variable. In general, each value will be independent of the last.- Specified by:
nextin interfaceRandomVariableOps<T>- Returns:
- the next value
- Throws:
RandomVariableException- if the next value could not be generated
-
getMinimum
Description copied from interface:RandomVariableOpsGet 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:
getMinimumin interfaceRandomVariableOps<T>- Returns:
- the lower bound; null if there is none
-
getMinimumClosed
Description copied from interface:RandomVariableOpsDetermine if a random variable's lower bound can be generated.- Specified by:
getMinimumClosedin 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:RandomVariableOpsGet 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:
getMaximumin interfaceRandomVariableOps<T>- Returns:
- the upper bound; null if there is none
-
getMaximumClosed
Description copied from interface:RandomVariableOpsDetermine if a random variable's upper bound can be generated.- Specified by:
getMaximumClosedin interfaceRandomVariableOps<T>- Returns:
- true if it can be generated; false if it cannot be generated; null if this cannot be determined
-