java.lang.Object
- All Implemented Interfaces:
Cloneable
,RandomVariableOps<BinomialDoubleRV>
,RandomVariableRVNOps<Double,
,BinomialDoubleRV> RandomVariableRVOps<Double,
BinomialDoubleRV>
Class to generate a sequence of Double-valued binomial random variables.
-
Constructor Summary
ConstructorsConstructorDescriptionBinomialDoubleRVRV
(DoubleRandomVariable prob, double n) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected BinomialDoubleRV
doNext()
Get the next value for a random variable.Methods inherited from class org.bzdev.math.rv.DoubleRandomVariableRV
cmp, next, setMaximum, setMinimum, tightenMaximum, tightenMaximumS, tightenMinimum, tightenMinimumS
Methods inherited from class org.bzdev.math.rv.RandomVariableRVN
getMaximumClosed, getMaximumRV, getMinimumClosed, getMinimumRV
Methods inherited from class org.bzdev.math.rv.RandomVariableRV
determineIfOrdered, getCharacteristics, parallelStream, parallelStream, stream, stream
Methods inherited from class org.bzdev.math.rv.RandomVariable
clone, getMaximum, getMinimum, 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, getMinimum, setMaximum, setMinimum, tightenMaximum, tightenMinimum
-
Constructor Details
-
BinomialDoubleRVRV
Constructor. For n < 61, n is rounded to the nearest integer.- Parameters:
prob
- a random variable that determines the probability of a success for a single try.n
- the number of tries.
-
BinomialDoubleRVRV
Constructor.- Parameters:
prob
- a random variable that determines the probability of a success for a single try.n
- a random variable that determines the number of tries.
-
-
Method Details
-
doNext
Description copied from class:RandomVariableRVN
Get the next value for a random variable. In general, each value will be independent of the last.- Specified by:
doNext
in classRandomVariableRVN<Double,
BinomialDoubleRV> - Returns:
- the next random variable
- Throws:
RandomVariableException
- the next random variable could not be generated.
-