Module org.bzdev.math
Package org.bzdev.math.rv
Class BooleanRandomVariableRV<BRV extends BooleanRandomVariable>
- All Implemented Interfaces:
Cloneable,RandomVariableOps<BRV>,RandomVariableRVOps<Boolean,BRV>
- Direct Known Subclasses:
BinomialBooleanRVRV,FixedBooleanRVRV
public abstract class BooleanRandomVariableRV<BRV extends BooleanRandomVariable>
extends RandomVariableRV<Boolean,BRV>
Random variable that generates the a sequence of random variables, each
of which generates a sequence of boolean values (of type Boolean). The type
parameter BRV is set to the type of random variable that is to be
generated, which will usually be a subclass of LongRandomVariable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BRVnext()Get the next value for a random variable.parallelStream(long size) Get a fixed-length parallel stream of random variables.stream(long size) Get a fixed-length stream of random variables.voidtightenMaximumS(String s, boolean closed) Tighten the maximum value for a random variable given a string.voidtightenMinimumS(String s, boolean closed) Tighten the minimum value for a random variable given a string.Methods inherited from class org.bzdev.math.rv.RandomVariableRV
determineIfOrdered, getCharacteristics, parallelStream, streamMethods inherited from class org.bzdev.math.rv.RandomVariable
clone, 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
-
BooleanRandomVariableRV
public BooleanRandomVariableRV()
-
-
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<BRV extends BooleanRandomVariable>- Specified by:
nextin classRandomVariable<BRV extends BooleanRandomVariable>- Returns:
- the next value
-
tightenMinimumS
Description copied from class:RandomVariableTighten 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<BRV extends BooleanRandomVariable>- Specified by:
tightenMinimumSin classRandomVariable<BRV extends BooleanRandomVariable>- Parameters:
s- 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 reasons
-
tightenMaximumS
Description copied from class:RandomVariableTighten 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<BRV extends BooleanRandomVariable>- Specified by:
tightenMaximumSin classRandomVariable<BRV extends BooleanRandomVariable>- Parameters:
s- 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 reasons
-
stream
Description copied from class:RandomVariableRVGet a fixed-length stream of random variables.- Overrides:
streamin classRandomVariableRV<Boolean,BRV extends BooleanRandomVariable> - Parameters:
size- the number of random values to provide- Returns:
- the stream
-
parallelStream
Description copied from class:RandomVariableRVGet a fixed-length parallel stream of random variables.- Overrides:
parallelStreamin classRandomVariableRV<Boolean,BRV extends BooleanRandomVariable> - Parameters:
size- the number of random values to provide- Returns:
- the stream
-