![]() |
Synthia
Generic and flexible data structure generator
|
Generates a sequence of monotonically increasing numerical values.
The Tick picker requires two parameters:
Consider the following piece of code:
Tick t1 = new Tick(10, 0.5); Tick t2 = new Tick(new RandomInteger(8, 12), new RandomIntervalFloat(0.5, 1.5));
The first instruction creates a Tick picker whose initial value is 10, and each subsequent value is incremented by exactly 0.5. The second instruction creates a Tick picker whose initial value is picked in the interval [8,12), and where each subsequent value is incremented by a number randomly chosen between 0.5 and 1.5.

Public Member Functions | |
| Tick (Picker<? extends Number > start, Picker<? extends Number > increment) | |
| Creates a new Tick picker. More... | |
| Tick (Number start, Number increment) | |
| Creates a new Tick picker. More... | |
| Tick (Number start, Picker<? extends Number > increment) | |
| Creates a new Tick picker. More... | |
| Tick (Picker<? extends Number > increment) | |
| Creates a new Tick picker starting at value 0. More... | |
| Tick () | |
| Creates a new Tick picker starting at value 0, and where each subsequent value is incremented by a number uniformly chosen in the interval [0,1]. More... | |
| void | reset () |
| Puts the tick back into its initial state. More... | |
| Number | pick () |
| Picks a tick value. More... | |
| Tick | duplicate (boolean with_state) |
| Creates a copy of the tick picker. More... | |
| Tick | duplicate (float start_value) |
| Tick | setValue (float value) |
| Sets the current value of the tick picker. More... | |
| String | toString () |
| PartNode | getExplanation (Part p) |
| PartNode | getExplanation (Part p, NodeFactory f) |
Protected Attributes | |
| Picker<? extends Number > | m_startValue |
| Picker that determines the start value. More... | |
| double | m_currentValue |
| Variable holding the current value of the tick. More... | |
| Picker<? extends Number > | m_increment |
| Picker that determines the increment for each subsequent value. More... | |
| ca.uqac.lif.synthia.util.Tick.Tick | ( | Number | start, |
| Number | increment | ||
| ) |
| ca.uqac.lif.synthia.util.Tick.Tick | ( | Number | start, |
| Picker<? extends Number > | increment | ||
| ) |
| ca.uqac.lif.synthia.util.Tick.Tick | ( | Picker<? extends Number > | increment | ) |
| ca.uqac.lif.synthia.util.Tick.Tick | ( | ) |
| Tick ca.uqac.lif.synthia.util.Tick.duplicate | ( | boolean | with_state | ) |
Creates a copy of the tick picker.
| with_state | If set to false, the returned copy is set to the class' initial state (i.e. same thing as calling the picker's constructor). If set to true, the returned copy is put into the same internal state as the object it is copied from. |
Implements ca.uqac.lif.synthia.Picker< T >.
| Tick ca.uqac.lif.synthia.util.Tick.duplicate | ( | float | start_value | ) |
| PartNode ca.uqac.lif.synthia.util.Tick.getExplanation | ( | Part | p | ) |
| PartNode ca.uqac.lif.synthia.util.Tick.getExplanation | ( | Part | p, |
| NodeFactory | f | ||
| ) |
| Number ca.uqac.lif.synthia.util.Tick.pick | ( | ) |
Picks a tick value.
Typically, this method is expected to return non-null objects; a null return value is used to signal that no more objects will be produced. That is, once this method returns null, it should normally return null on all subsequent calls.
Implements ca.uqac.lif.synthia.Picker< T >.
| void ca.uqac.lif.synthia.util.Tick.reset | ( | ) |
Puts the tick back into its initial state.
This means that the sequence of calls to pick() will produce the same values as when the object was instantiated.
Implements ca.uqac.lif.synthia.Picker< T >.
| Tick ca.uqac.lif.synthia.util.Tick.setValue | ( | float | value | ) |
|
protected |
|
protected |
|
protected |