![]() |
Synthia
Generic and flexible data structure generator
|
Mutator that receives a list and selects two elements to be swapped.
| <T> | The type of elements in the list |

Public Member Functions | |
| Swap (Picker<? extends List< T >> picker, Picker< Float > position1, Picker< Float > position2) | |
| Creates a new instance of swap. More... | |
| List< T > | pick () |
| Picks an object. More... | |
| Swap< T > | duplicate (boolean with_state) |
| Creates a copy of the picker. More... | |
Public Member Functions inherited from ca.uqac.lif.synthia.util.Mutator< T > | |
| Mutator (Picker<? extends T > picker) | |
| Creates a new instance of mutator. More... | |
| Mutator< T > | setPicker (Picker<? extends T > picker) |
| Sets the picker producing the values to transform. More... | |
| void | reset () |
| Puts the picker back into its initial state. More... | |
| PartNode | getExplanation (Part p) |
| PartNode | getExplanation (Part p, NodeFactory f) |
Protected Attributes | |
| Picker< Float > | m_position1 |
| A picker used to select the position of the first element. More... | |
| Picker< Float > | m_position2 |
| A picker used to select the position of the second element. More... | |
Protected Attributes inherited from ca.uqac.lif.synthia.util.Mutator< T > | |
| Picker<? extends T > | m_picker |
| The underlying picker producing the values to transform. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ca.uqac.lif.synthia.util.Mutator< T > | |
| PartNode | getExplanationForOutput (int output_index, Part p, NodeFactory f) |
| void | copyInto (Mutator< T > m, boolean with_state) |
| ca.uqac.lif.synthia.collection.Swap< T >.Swap | ( | Picker<? extends List< T >> | picker, |
| Picker< Float > | position1, | ||
| Picker< Float > | position2 | ||
| ) |
| Swap<T> ca.uqac.lif.synthia.collection.Swap< T >.duplicate | ( | boolean | with_state | ) |
Creates a copy of the 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 >.
| List<T> ca.uqac.lif.synthia.collection.Swap< T >.pick | ( | ) |
Picks an object.
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 >.
|
protected |
|
protected |