86 double get()
const {
return value; }
88 operator double () {
return get(); }
90 virtual double next(
double y) = 0;
92 virtual void reset() = 0;
111 void push_to_buffer(
double y);
117 double operator= (
double _value) {
return next(_value); }
118 virtual double next(
double y);
119 virtual void reset();
120 double deviation()
const;
139 sort_buffer.resize(size);
141 double operator= (
double _value) {
return next(_value); }
142 virtual double next(
double y);
165 void setAlpha(
double _alpha) { alpha=std::max(std::min(_alpha,1.0),0.0); }
167 double operator= (
double _value) {
return next(_value); }
168 virtual double next(
double y);
169 virtual void reset();
195 void setGamma(
double _gamma) { gamma=std::max(std::min(_gamma,1.0),0.0); }
197 double operator= (
double _value) {
return next(_value); }
198 virtual double next(
double y);
222 if (tmp)
delete [] tmp;
223 tmp =
new double[size];
230 for (
size_t i=0; i<arr.size(); i++) {
233 return &(tmp[start_i]);
void SetSize(size_t size)
FilterDoubleExponentialSmoothing provides an weighted running average filter
const double * as_double_array(size_t start_i=0)
TFSIMD_FORCE_INLINE const tfScalar & y() const
FilterDoubleExponentialSmoothing(double _alpha=0.5, double _gamma=1.0)
Filter is pure virtual class describing the basic virtual interface for all filters ...
void setGamma(double _gamma)
void setAlpha(double _alpha)
FilterRunningAverage provides an weighted running average filter
Class for handling an array of filtered values.
FilterAverage provides an average filter
void setWindowSize(int size)
FilterRunningAverage(double _alpha=0.5)
std::deque< double > buffer
FilterAverage(int size=3)
This file defines library export definitions, version numbers and build information.