OpenWareLaboratory
|
Applies exponential smoothing to a scalar value. More...
Public Member Functions | |
const float | DEFAULT_DELTA |
const int | DEFAULT_DELTA |
const float | DEFAULT_DELTA |
const int | DEFAULT_DELTA |
const float | DEFAULT_EXP_C |
const int | DEFAULT_EXP_C |
const float | DEFAULT_EXP_C |
const int | DEFAULT_EXP_C |
const float | DEFAULT_EXP_K |
const int | DEFAULT_EXP_K |
const float | DEFAULT_EXP_K |
const int | DEFAULT_EXP_K |
const float | DEFAULT_LAMBDA |
const int | DEFAULT_LAMBDA |
const float | DEFAULT_LAMBDA |
const int | DEFAULT_LAMBDA |
const float | DEFAULT_LOG_C |
const int | DEFAULT_LOG_C |
const float | DEFAULT_LOG_C |
const int | DEFAULT_LOG_C |
const float | DEFAULT_LOG_K |
const int | DEFAULT_LOG_K |
const float | DEFAULT_LOG_K |
const int | DEFAULT_LOG_K |
T | get () |
operator T () | |
SmoothValue< T, Value > & | operator*= (const T &other) |
SmoothValue< T, Value > & | operator+= (const T &other) |
SmoothValue< T, Value > & | operator-= (const T &other) |
SmoothValue< T, Value > & | operator/= (const T &other) |
SmoothValue< T, Value > & | operator= (const T &x) |
void | reset (T x) |
SmoothValue () | |
SmoothValue (const SmoothValue< T, Value > &other) | |
SmoothValue (T lambda, T init) | |
SmoothValue (T value) | |
void | update (T x) |
Static Public Member Functions | |
static T | normal (float lambda, int blocksize) |
Data Fields | |
T | lambda = Value::DEFAULT_LAMBDA |
Static Public Attributes | |
static const T | DEFAULT_DELTA |
static const T | DEFAULT_EXP_C |
static const T | DEFAULT_EXP_K |
static const T | DEFAULT_LAMBDA |
static const T | DEFAULT_LOG_C |
static const T | DEFAULT_LOG_K |
Protected Attributes | |
T | value |
Applies exponential smoothing to a scalar value.
y(n) = lambda*y(n-1) + (1.0-lambda)*y(n) for floats y(n) = (lambda*y(n-1) + y(n))/(lambda+1) for ints Smoothing is applied when the value is written to, not when it is read. todo: adjust for sampling frequency / blocksize (time delay of the response (mean) is 1/α data points) https://en.wikipedia.org/wiki/Exponential_smoothing
Definition at line 15 of file SmoothValue.h.
|
inline |
Definition at line 18 of file SmoothValue.h.
|
inline |
Definition at line 19 of file SmoothValue.h.
|
inline |
Definition at line 20 of file SmoothValue.h.
|
inline |
Definition at line 21 of file SmoothValue.h.
|
inherited |
Definition at line 11 of file SimpleValue.cpp.
|
inherited |
Definition at line 17 of file SimpleValue.cpp.
|
inherited |
Definition at line 61 of file SimpleValue.h.
|
inherited |
Definition at line 67 of file SimpleValue.h.
|
inherited |
Definition at line 12 of file SimpleValue.cpp.
|
inherited |
Definition at line 18 of file SimpleValue.cpp.
|
inherited |
Definition at line 62 of file SimpleValue.h.
|
inherited |
Definition at line 68 of file SimpleValue.h.
|
inherited |
Definition at line 13 of file SimpleValue.cpp.
|
inherited |
Definition at line 19 of file SimpleValue.cpp.
|
inherited |
Definition at line 63 of file SimpleValue.h.
|
inherited |
Definition at line 69 of file SimpleValue.h.
|
inherited |
Definition at line 10 of file SimpleValue.cpp.
|
inherited |
Definition at line 16 of file SimpleValue.cpp.
|
inherited |
Definition at line 60 of file SimpleValue.h.
|
inherited |
Definition at line 66 of file SimpleValue.h.
|
inherited |
Definition at line 14 of file SimpleValue.cpp.
|
inherited |
Definition at line 20 of file SimpleValue.cpp.
|
inherited |
Definition at line 64 of file SimpleValue.h.
|
inherited |
Definition at line 70 of file SimpleValue.h.
|
inherited |
Definition at line 15 of file SimpleValue.cpp.
|
inherited |
Definition at line 21 of file SimpleValue.cpp.
|
inherited |
Definition at line 65 of file SimpleValue.h.
|
inherited |
Definition at line 71 of file SimpleValue.h.
|
inlineinherited |
Definition at line 19 of file SimpleValue.h.
References SimpleValue< T >::value.
Referenced by SimpleValue< T >::operator T().
|
static |
|
inline |
Definition at line 45 of file SmoothValue.h.
|
inline |
Definition at line 37 of file SmoothValue.h.
References SmoothValue< T, Value >::update().
|
inline |
Definition at line 29 of file SmoothValue.h.
References SmoothValue< T, Value >::update().
|
inline |
Definition at line 33 of file SmoothValue.h.
References SmoothValue< T, Value >::update().
|
inline |
Definition at line 41 of file SmoothValue.h.
References SmoothValue< T, Value >::update().
|
inline |
Definition at line 25 of file SmoothValue.h.
References SmoothValue< T, Value >::update().
|
inlineinherited |
Definition at line 22 of file SimpleValue.h.
References SimpleValue< T >::value.
|
inline |
Definition at line 22 of file SmoothValue.h.
References SmoothValue< T, Value >::lambda.
Referenced by SmoothValue< T, Value >::operator*=(), SmoothValue< T, Value >::operator+=(), SmoothValue< T, Value >::operator-=(), SmoothValue< T, Value >::operator/=(), and SmoothValue< T, Value >::operator=().
|
staticinherited |
Definition at line 52 of file SimpleValue.h.
|
staticinherited |
Definition at line 53 of file SimpleValue.h.
|
staticinherited |
Definition at line 54 of file SimpleValue.h.
|
staticinherited |
Definition at line 51 of file SimpleValue.h.
|
staticinherited |
Definition at line 55 of file SimpleValue.h.
|
staticinherited |
Definition at line 56 of file SimpleValue.h.
T SmoothValue< T, Value >::lambda = Value::DEFAULT_LAMBDA |
Definition at line 17 of file SmoothValue.h.
Referenced by SmoothValue< T, Value >::update().
|
protectedinherited |
Definition at line 14 of file SimpleValue.h.
Referenced by SimpleValue< T >::get(), SimpleValue< T >::operator*=(), SimpleValue< T >::operator+=(), SimpleValue< T >::operator-=(), SimpleValue< T >::operator/=(), SimpleValue< T >::reset(), TakeoverValue< T, Value >::setLocked(), and SimpleValue< T >::update().