27 #ifndef GRT_WEIGHTED_AVERAGE_FILTER_HEADER 28 #define GRT_WEIGHTED_AVERAGE_FILTER_HEADER 30 #include "../CoreModules/PreProcessing.h" 103 virtual bool save( std::fstream &file )
const;
112 virtual bool load( std::fstream &file );
121 bool init(
const UINT filterSize,
const UINT numDimensions);
129 Float filter(
const Float x);
144 UINT getFilterSize()
const;
157 static std::string
getId();
170 static const std::string id;
176 #endif //GRT_MOVING_AVERAGE_FILTER_HEADER std::string getId() const
virtual bool deepCopyFrom(const PreProcessing *rhs)
UINT inputSampleCounter
A counter to keep track of the number of input samples.
CircularBuffer< VectorFloat > dataBuffer
A buffer to store the previous N values, N = filterSize.
virtual bool save(const std::string &filename) const
virtual bool reset() override
The WeightedAverageFilter implements a weighted average filter that gives a larger weight to more rec...
UINT filterSize
The size of the filter.
virtual bool process(const VectorFloat &inputVector)
virtual bool load(const std::string &filename)
VectorFloat weights
Stores the weights for each sample in the buffer, the size of this vector will match the filterSize...