SliceShuffle Class Reference
[Processing]

Shuffle the incoming slices randomly. More...

#include <SliceShuffle.h>

Inherits Marsyas::MarSystem.


Public Member Functions

MarSystemclone () 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.


Detailed Description

Shuffle the incoming slices randomly.

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.


Constructor & Destructor Documentation

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_.


Member Function Documentation

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().

void myProcess ( realvec in,
realvec out 
) [virtual]

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().


The documentation for this class was generated from the following files:

Generated on Wed May 23 00:02:23 2012 for Marsyas by  doxygen 1.5.6