⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ewma64.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
// -*- c-basic-offset: 4; related-file-name: "../../lib/ewma64.cc" -*-#ifndef CLICK_EWMA64_HH#define CLICK_EWMA64_HH#include <click/confparse.hh>CLICK_DECLSclass DirectEWMA64 { public:    DirectEWMA64()			{ _avg = 0; _ss = 10; }    uint64_t average() const		{ return _avg; }    unsigned stability_shift() const	{ return _ss; }    void set_stability_shift(unsigned ss) { _ss = ss; }    int64_t compensation() const	{ return ((int64_t)1) << (_ss - 1); }    void clear()			{ _avg = 0; }    inline void update_with(uint64_t);    void update_zero_period(unsigned);    String unparse() const;  private:        uint64_t _avg;    unsigned _ss;};inline voidDirectEWMA64::update_with(uint64_t val){    _avg += static_cast<int64_t>(val - _avg + compensation()) >> stability_shift();    // XXX implementation-defined right shift behavior}CLICK_ENDDECLS#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -