Dynamic sequence is a set of elements that must be applied during dynamic simulations to provide dynamic behavior to dynamic objects.
More...
|
| DynSequence () |
| Default constructor for the dynamic sequence.
|
|
| DynSequence (string id, string next, size_t loop) |
| Dynamic sequence basic constructor. More...
|
|
vector< shared_ptr< T > > | nextStep () |
| Obtain sequence corresponding to next step.
|
|
void | restart () |
| Restart the dynamic sequence so when nextStep is called again it will start from the first iteration.
|
|
void | append (shared_ptr< T > element) |
| Append an element to the sequence. More...
|
|
void | append (vector< shared_ptr< T >> elements) |
| Append vector of elements to the end of the sequence. More...
|
|
shared_ptr< T > | get (size_t index) const |
| Obtain element at given index in the sequence. More...
|
|
void | set (size_t index, shared_ptr< T > element) |
| Set element at given index in the sequence. More...
|
|
void | remove (size_t index) |
| Remove element at given index in the sequence. More...
|
|
size_t | size () const |
| Obtain the number of elements composing the sequence. More...
|
|
vector< T >::iterator | begin () |
| Obtain a iterator pointing to the first dynamic sequence element. More...
|
|
vector< T >::iterator | end () |
| Obtain a iterator pointing to the last dynamic sequence element. More...
|
|
void | clear () |
| Remove all elements composing the sequence.
|
|
size_t | getIteration () const |
| Get current iteration. More...
|
|
size_t | getLoop () const |
| Get loop value (max iterations) More...
|
|
void | setLoop (size_t const loop) |
| Set loop value (max iterations) More...
|
|
string | getId () const |
| Get current identifier for the dynamic sequence. More...
|
|
void | setId (string const &id) const |
| Set identifier for the dynamic sequence. More...
|
|
string | getNext () const |
| Get next identifier for the dynamic sequence. More...
|
|
void | setNext (string const &next) |
| Set next identifier for the dynamic sequence. More...
|
|
template<typename T>
class DynSequence< T >
Dynamic sequence is a set of elements that must be applied during dynamic simulations to provide dynamic behavior to dynamic objects.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
- Template Parameters
-
T | Type of elements composing the sequence |
A dynamic sequence consists in a set of elements called the sequence \(\mathcal{S}=\left\{S_1, \ldots, S_m\right\}\). The dynamic sequence is looped \(l\) times. To illustrate this, let \(f_t\left(\mathcal{S}, X\right)\) be the function which applies the sequence \(\mathcal{S}\) to a dynamic object \(X\) at \(t\) time. Thus, applying a dynamic sequence can be summarized in following expression:
\[ \forall t \in [1, l], f_t\left(\mathcal{S}, X\right) \]
Once the sequence is applied, the sequence identified by the next attribute of finished sequence will be applied, if any.
- See also
- DynSequencer