|
Click
|
Parameters for a EWMA with constant scaling factor and stability shift. More...
#include <click/ewma.hh>
Public Types | |
| typedef T | value_type |
| typedef U | signed_value_type |
Static Public Member Functions | |
| static unsigned | stability_shift () |
| Return this EWMA's stability shift. | |
| static unsigned | scale () |
| Return this EWMA's scaling factor (bits of fraction). | |
| static value_type | scaled_one () |
| Return this EWMA's scaled value for one. | |
| static unsigned | compensation () |
| Return this EWMA's compensation. | |
Parameters for a EWMA with constant scaling factor and stability shift.
The FixedEWMAXParameters template class is used as a template argument to DirectEWMAX. It defines a EWMA with fixed constant scaling factor and stability shift. FixedEWMAXParameters's first template argument is the EWMA's stability shift, its second template argument is the EWMA's scaling factor, its third template argument is the EWMA's value type, and the fourth template argument is the EWMA's signed value type.
Example 1: DirectEWMAX<FixedEWMAXParameters<4, 10, unsigned, int> > defines a EWMA with alpha 1/16 (stability shift 4), scaling factor 10, and value type unsigned. (These are the default parameters available in the DirectEWMA typedef.)
Example 2: DirectEWMAX<FixedEWMAXParameters<3, 10, uint64_t, int64_t> > defines a EWMA with alpha 1/8 (stability shift 3), scaling factor 10, and value type uint64_t.
|
inlinestatic |
Return this EWMA's stability shift.
|
inlinestatic |
Return this EWMA's scaling factor (bits of fraction).
|
inlinestatic |
Return this EWMA's scaled value for one.
|
inlinestatic |
Return this EWMA's compensation.