 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file. 1 package ca.uqac.lif.synthia.enumerative;
8 import java.util.ArrayList;
56 private AllIntegers(
int min,
int max,
int actual_value,
boolean scramble
57 , List<Integer> values_to_scramble,
RandomInteger index_generator)
70 private void InitializeList()
85 this(min, max,
false);
154 picked_value = scrambledPick();
165 private Integer scrambledPick()
AllIntegers duplicate(boolean with_state)
Creates a copy of the picker.
RandomInteger m_indexGenerator
RandomInteger to generate random index if the scramble flag is set to true.
int m_max
The maximal value the picker can generate.
Picker who implements EnumerativePicker.
Pickers that produce pseudo-random objects such as numbers.
void reset()
Puts the picker back into its initial state.
RandomInteger setInterval(int min, int max)
Sets the interval in which integers are picked.
Interface used to signal that a picker enumerates all values from a set.
void reset()
Puts the picker back into its initial state.
RandomInteger setSeed(int seed)
Picks an integer uniformly in an interval.
Integer pick()
Picks a random integer.
RandomInteger duplicate(boolean with_state)
Creates a copy of the RandomInteger picker.
List< Integer > m_valuesToScramble
List to store the values to generate if the scramble flag is set to true.
AllIntegers setSeed(int seed)
Set the seed of the random generator.
int m_min
The minimal value the picker can generate.
Integer pick()
Picks an object.
AllIntegers(int min, int max)
Constructor with false as a default value for the scramble flag.
final boolean m_scramble
Flag to check if the picker scrambles the values to generate or not.
AllIntegers(int min, int max, boolean scramble)
Constructor without default value for the scramble flag.
int m_actualValue
The actual value to generate.
An exception to throw when a picker can't pick an other element.
boolean isDone()
Signals if the picker enumerates all values from a set.
Interface implemented by objects that can be seeded.