Click
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
RateEWMAXParameters< STABILITY, SCALE, T, U > Class Template Reference

Parameters for a RateEWMA with constant scaling factor and alpha, one rate count, and epochs of jiffies. More...

#include <click/ewma.hh>

Inheritance diagram for RateEWMAXParameters< STABILITY, SCALE, T, U >:
FixedEWMAXParameters< STABILITY, SCALE, T, U >

Public Types

enum  { rate_count = 1 }
 
- Public Types inherited from FixedEWMAXParameters< STABILITY, SCALE, T, U >
typedef T value_type
 
typedef U signed_value_type
 

Static Public Member Functions

static unsigned epoch ()
 Return the current epoch number.
 
static unsigned epoch_frequency ()
 Return the number of epochs (jiffies) per second.
 
- Static Public Member Functions inherited from FixedEWMAXParameters< STABILITY, SCALE, T, U >
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.
 

Detailed Description

template<unsigned STABILITY, unsigned SCALE, typename T = unsigned, typename U = int>
class RateEWMAXParameters< STABILITY, SCALE, T, U >

Parameters for a RateEWMA with constant scaling factor and alpha, one rate count, and epochs of jiffies.

The RateEWMAXParameters template class is used as a template argument to RateEWMAX. It defines a EWMA with fixed constant scaling factor and alpha and one rate count. The EWMA uses jiffies as epochs. Template parameters are as for DirectEWMAXParameters.

Example: RateEWMAX<RateEWMAXParameters<4, 10, unsigned, int> > defines a rate EWMA with user-settable alpha (stability shift) initially equal to 1/16, scaling factor 10, and value type unsigned.

Member Function Documentation

◆ epoch()

template<unsigned STABILITY, unsigned SCALE, typename T = unsigned, typename U = int>
static unsigned RateEWMAXParameters< STABILITY, SCALE, T, U >::epoch ( )
inlinestatic

Return the current epoch number.

Note
RateEWMAXParameters measures epochs in jiffies.

◆ epoch_frequency()

template<unsigned STABILITY, unsigned SCALE, typename T = unsigned, typename U = int>
static unsigned RateEWMAXParameters< STABILITY, SCALE, T, U >::epoch_frequency ( )
inlinestatic

Return the number of epochs (jiffies) per second.


The documentation for this class was generated from the following file: