java.lang.Object
org.bzdev.math.rv.RandomVariable<Boolean>
org.bzdev.math.rv.BooleanRandomVariable
org.bzdev.math.rv.FixedBooleanRV
- All Implemented Interfaces:
Cloneable,RandomVariableOps<Boolean>
Random variable that always generates the same boolean value.
Useful when passing a constant to a method that expects a
random variable.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bzdev.math.rv.BooleanRandomVariable
parallelStream, parallelStream, stream, stream, tightenMaximumS, tightenMinimumSMethods inherited from class org.bzdev.math.rv.RandomVariable
clone, getCharacteristics, getMaximum, getMaximumClosed, getMinimum, getMinimumClosed, setMaximum, setMinimum, setRequiredMaximum, setRequiredMinimum, spliterator, spliterator, tightenMaximum, tightenMinimum
-
Constructor Details
-
FixedBooleanRV
public FixedBooleanRV(boolean value) Constructor.- Parameters:
value- the value of this random variable
-
-
Method Details
-
getValue
public boolean getValue()Get the value of this random variable, which is a constant.- Returns:
- the value
-
next
Description copied from class:RandomVariableGet the next value for a random variable. In general, each value will be independent of the last.- Specified by:
nextin interfaceRandomVariableOps<Boolean>- Specified by:
nextin classRandomVariable<Boolean>- Returns:
- the next value
-
toString
-