#include <SliceShuffle.h>
Inherits Marsyas::MarSystem.
Public Member Functions | |
| MarSystem * | clone () const |
| Implementation of the MarSystem::clone() method. | |
| void | myProcess (realvec &in, realvec &out) |
| Implementation of the MarSystem::myProcess method. | |
| SliceShuffle (const SliceShuffle &a) | |
| SliceShuffle copy constructor. | |
| SliceShuffle (std::string name) | |
| SliceShuffle constructor. | |
| ~SliceShuffle () | |
| SliceShuffle destructor. | |
Private Member Functions | |
| void | addControls () |
| Add specific controls needed by this MarSystem. | |
| void | myUpdate (MarControlPtr sender) |
| Reads changed controls and sets up variables if necessary. | |
Private Attributes | |
| mrs_natural | bufferSize_ |
| Caching variable for the buffer size. | |
| MarControlPtr | ctrl_bufferSize_ |
| MarControlPtr for the buffer size (number of slices that fit in buffer). | |
| mrs_natural | nSamples_ |
| Caching variable for the number of samples per slice. | |
| realvec | sliceBuffer_ |
| Internal memory for the previous observed slice. | |
Incoming slices are stored in a buffer and on each process call a random one is drawn as output.
Controls:
Definition at line 38 of file SliceShuffle.h.
| SliceShuffle | ( | std::string | name | ) |
SliceShuffle constructor.
Add any specific controls needed by this MarSystem.
Definition at line 24 of file SliceShuffle.cpp.
References SliceShuffle::addControls().
Referenced by SliceShuffle::clone().
| SliceShuffle | ( | const SliceShuffle & | a | ) |
SliceShuffle copy constructor.
All member MarControlPtr have to be explicitly reassigned in the copy constructor.
Definition at line 30 of file SliceShuffle.cpp.
References SliceShuffle::ctrl_bufferSize_.
| void addControls | ( | ) | [private] |
Add specific controls needed by this MarSystem.
Add any specific controls needed by this MarSystem.
Reimplemented from MarSystem.
Definition at line 49 of file SliceShuffle.cpp.
References SliceShuffle::ctrl_bufferSize_.
Referenced by SliceShuffle::SliceShuffle().
Implementation of the MarSystem::myProcess method.
Pick a random slice.
Get slice from buffer and store the new input.
Implements MarSystem.
Definition at line 74 of file SliceShuffle.cpp.
References SliceShuffle::bufferSize_, and SliceShuffle::sliceBuffer_.
| void myUpdate | ( | MarControlPtr | sender | ) | [private, virtual] |
Reads changed controls and sets up variables if necessary.
Use the default MarSystem setup with equal input/output stream format.
Reimplemented from MarSystem.
Definition at line 58 of file SliceShuffle.cpp.
References SliceShuffle::bufferSize_, realvec::setval(), SliceShuffle::sliceBuffer_, and realvec::stretch().
1.5.6