30 #ifndef GRT_WEIGHTED_AVERAGE_FILTER_HEADER
31 #define GRT_WEIGHTED_AVERAGE_FILTER_HEADER
33 #include "../CoreModules/PreProcessing.h"
129 Float
filter(
const Float x);
165 #endif //GRT_MOVING_AVERAGE_FILTER_HEADER
virtual ~WeightedAverageFilter()
UINT inputSampleCounter
A counter to keep track of the number of input samples.
WeightedAverageFilter & operator=(const WeightedAverageFilter &rhs)
virtual bool loadModelFromFile(std::fstream &file)
CircularBuffer< VectorFloat > dataBuffer
A buffer to store the previous N values, N = filterSize.
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
WeightedAverageFilter(UINT filterSize=5, UINT numDimensions=1)
UINT getFilterSize() const
virtual bool loadModelFromFile(std::string filename)
virtual bool process(const VectorFloat &inputVector)
UINT filterSize
The size of the filter.
virtual bool saveModelToFile(std::fstream &file) const
virtual bool saveModelToFile(std::string filename) const
Float filter(const Float x)
VectorFloat getFilteredData() const
VectorFloat weights
Stores the weights for each sample in the buffer, the size of this vector will match the filterSize...