java.lang.Object
- All Implemented Interfaces:
Cloneable
,RandomVariableOps<BinomialBooleanRV>
,RandomVariableRVOps<Boolean,
BinomialBooleanRV>
Random variable that generates a binomial boolean-valued random variable.
-
Constructor Summary
ConstructorsConstructorDescriptionBinomialBooleanRVRV
(double prob) Constructor given a probability.Constructor given a random number that generates the probability -
Method Summary
Methods inherited from class org.bzdev.math.rv.BooleanRandomVariableRV
parallelStream, stream, tightenMaximumS, tightenMinimumS
Methods inherited from class org.bzdev.math.rv.RandomVariableRV
determineIfOrdered, getCharacteristics, parallelStream, stream
Methods inherited from class org.bzdev.math.rv.RandomVariable
getMaximum, getMaximumClosed, getMinimum, getMinimumClosed, setMaximum, setMinimum, setRequiredMaximum, setRequiredMinimum, spliterator, spliterator, tightenMaximum, tightenMinimum
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bzdev.math.rv.RandomVariableOps
getMaximum, getMaximumClosed, getMinimum, getMinimumClosed, setMaximum, setMinimum, tightenMaximum, tightenMinimum
-
Constructor Details
-
BinomialBooleanRVRV
Constructor given a random number that generates the probability- Parameters:
prob
- a random variable giving the probability that the value is 'true'
-
BinomialBooleanRVRV
public BinomialBooleanRVRV(double prob) Constructor given a probability. Probabilities must be in the range [0.0, 1.0];- Parameters:
prob
- the probability that a value gemerated by a random variable created by this class is 'true'- Throws:
IllegalArgumentException
- the argument was out range
-
-
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<BinomialBooleanRV>
- Specified by:
next
in classBooleanRandomVariableRV<BinomialBooleanRV>
- Returns:
- the next value
-
clone
- Overrides:
clone
in classRandomVariable<BinomialBooleanRV>
- Throws:
CloneNotSupportedException
-