 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file.
19 package ca.uqac.lif.synthia.random;
Interface signaling that a picker can be shrunk.
Interface implemented by pickers whose picking of objects can be altered by external information.
Miscellaneous pickers performing various functions.
void tell(Float p)
Sets the probability for this picker to return true.
static final transient RandomFloat instance
A public static instance of RandomFloat.
float m_trueProbability
The probability of picking true
Picker that returns the same object every time.
Shrinkable< Boolean > shrink(Boolean o, Picker< Float > decision, float magnitude)
RandomBoolean()
Creates a new instance of the picker, with a 50-50 chance of producing true or false
Boolean pick()
Picks a random boolean.
A RelativePicker that only throws a NoMoreElementException when the pick() method is called.
void reset()
Puts the picker back into its initial state.
Random Duplicate()
Creates a new instance of the class with the exact same internal states that the original one.
RandomBoolean duplicate(boolean with_state)
Creates a copy of the RandomBoolean picker.
Picks an object based on the value of a random number generator.
An instance of this class is used to generate a stream of pseudorandom numbers.
Shrinkable< Boolean > shrink(Boolean o)
float nextFloat()
Returns the next pseudorandom, uniformly distributed.
Picks a floating point number uniformly in an interval.
transient Random m_random
RandomBoolean(Number true_probability)
Creates a new instance of the picker.