 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file.
19 package ca.uqac.lif.synthia.util;
22 import ca.
uqac.
lif.petitpoucet.NodeFactory;
25 import ca.
uqac.
lif.petitpoucet.function.ExplanationQueryable;
51 public class Tick implements Picker<Number>, ExplanationQueryable
94 public Tick(Number start, Number increment)
180 tp.m_first = m_first;
217 PartNode root = f.getPartNode(p,
this);
229 AndNode and = f.getAndNode();
232 and.addChild(f.getPartNode(new_p,
this));
Tick duplicate(float start_value)
static Part replaceOutIndexBy(Part from, int index)
Given an arbitrary designator, replaces the first occurrence of NthOutput by an instance of NthInput ...
Number pick()
Picks a tick value.
PartNode getExplanation(Part p, NodeFactory f)
Tick(Picker<? extends Number > increment)
Creates a new Tick picker starting at value 0.
Picker<? extends Number > m_startValue
Picker that determines the start value.
Pickers that produce pseudo-random objects such as numbers.
Picker that returns the same object every time.
Picker<? extends Number > m_increment
Picker that determines the increment for each subsequent value.
Tick()
Creates a new Tick picker starting at value 0, and where each subsequent value is incremented by a nu...
Objects related to the explanation of results produced by pickers.
Generates a sequence of monotonically increasing numerical values.
Tick(Number start, Picker<? extends Number > increment)
Creates a new Tick picker.
void reset()
Puts the tick back into its initial state.
Tick(Picker<? extends Number > start, Picker<? extends Number > increment)
Creates a new Tick picker.
Tick(Number start, Number increment)
Creates a new Tick picker.
double m_currentValue
Variable holding the current value of the tick.
Picks a floating point number uniformly in an interval.
static int mentionedOutput(Part d)
Retrieves the output sequence index mentioned in a designator.
void reset()
Puts the picker back into its initial state.
PartNode getExplanation(Part p)
Tick duplicate(boolean with_state)
Creates a copy of the tick picker.
A Part pointing to the n-th output produced by a picker since its last call to reset().
Tick setValue(float value)
Sets the current value of the tick picker.