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, tightenMinimumSMethods inherited from class org.bzdev.math.rv.RandomVariableRV
determineIfOrdered, getCharacteristics, parallelStream, streamMethods inherited from class org.bzdev.math.rv.RandomVariable
getMaximum, getMaximumClosed, getMinimum, getMinimumClosed, setMaximum, setMinimum, setRequiredMaximum, setRequiredMinimum, spliterator, spliterator, tightenMaximum, tightenMinimumMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:RandomVariableGet the next value for a random variable. In general, each value will be independent of the last.- Specified by:
nextin interfaceRandomVariableOps<BinomialBooleanRV>- Specified by:
nextin classBooleanRandomVariableRV<BinomialBooleanRV>- Returns:
- the next value
-
clone
- Overrides:
clonein classRandomVariable<BinomialBooleanRV>- Throws:
CloneNotSupportedException
-