31 #ifndef GRT_FILTER_HEADER 32 #define GRT_FILTER_HEADER 34 #include "GRT/CoreModules/PreProcessing.h" 38 class Filter :
public PreProcessing {
77 virtual bool deepCopyFrom(
const PreProcessing *preProcessing);
87 virtual bool process(
const VectorDouble &inputVector);
149 double filter(
const double x);
157 VectorDouble
filter(
const VectorDouble &x);
201 #endif //GRT_FILTER_HEADER CircularBuffer< VectorDouble > dataBuffer
A buffer to store the previous N values, N = filterSize.
Definition: Filter.h:194
double filter(const double x)
Definition: Filter.cpp:247
UINT getFilterSize() const
Definition: Filter.h:172
virtual ~Filter()
Definition: Filter.cpp:54
vector< VectorDouble > getDataBuffer() const
Definition: Filter.cpp:284
UINT inputSampleCounter
A counter to keep track of the number of input samples.
Definition: Filter.h:193
Definition: Filter.cpp:23
virtual bool process(const VectorDouble &inputVector)
Definition: Filter.cpp:95
VectorDouble getFilteredData() const
Definition: Filter.h:179
virtual bool loadModelFromFile(string filename)
Definition: Filter.cpp:155
virtual double computeFilter(const VectorDouble &buf)=0
bool init(UINT filterSize, UINT numDimensions)
Definition: Filter.cpp:216
Filter(const char *classType, UINT filterSize=5, UINT numDimensions=1)
Definition: Filter.cpp:28
UINT filterSize
The size of the filter.
Definition: Filter.h:192
Filter & operator=(const Filter &rhs)
Definition: Filter.cpp:58
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
Definition: Filter.cpp:77
virtual bool saveModelToFile(string filename) const
Definition: Filter.cpp:119
virtual bool reset()
Definition: Filter.cpp:114