TS++ library: time series library
|
#include <dropcontainer.h>
Public Types | |
typedef T | Tvalue |
typedef DropContainer< Tvalue > * | PDropContainer |
typedef aff::Series< Tvalue > | Tseries |
Public Member Functions | |
DropContainer () | |
virtual | ~DropContainer () |
virtual void | initialize (const int &n) |
initialize for n samples input More... | |
virtual void | drop (const Tvalue &v)=0 |
this function accepts samples More... | |
virtual PDropContainer | attach (const DropContainer &c) |
virtual const Tseries::Tcoc & | container () const |
virtual int | downsampling_factor () const |
virtual Tvalue | gain () const |
Protected Member Functions | |
virtual PDropContainer | clone () const =0 |
virtual void | initializenext (const int &n)=0 |
PDropContainer | attached () const |
Protected Attributes | |
PDropContainer | Moutput |
Abstract base class
The DropContainer class is an abstract base class. It is used to collect time series samples and to decimate them on the fly. Derived classes have to be defined for this interface in oder to provide proper downsampling.
The interface works as follows (code is given only for illustration; in your application you will use different classes):
The full code as used in tstest.cc is as follows:
The DropContainer class sets up a linked list of pointers. It keeps track of initialized pointers and call the delete appropriately.
The total downsampling factor is returned by member function downsampling_factor() and the overall gain is provided by member function gain().
Definition at line 105 of file dropcontainer.h.