?? fading.hpp
字號:
#ifndef FADING_H #define FADING_H #include <map> using namespace std; #include <boost/shared_ptr.hpp> #include <boost/utility.hpp> #include "utility.hpp" class WirelessCommSignal; class PhysicalLayer; class NodeId; class Fading : boost::noncopyable { public: typedef boost::shared_ptr<Fading> FadingPtr; virtual ~Fading(); virtual double fadingFactor(const WirelessCommSignal& signal, const NodeId& nodeId) = 0; protected: map<NodeId,int> m_nodeOffset; Fading(); Fading(const Fading& rhs); private: Fading& operator= (const Fading& rhs); }; typedef boost::shared_ptr<Fading> FadingPtr; class Ricean : public Fading { public: typedef boost::shared_ptr<Ricean> RiceanPtr; static inline RiceanPtr create(); static inline RiceanPtr create(const Ricean& rhs); static inline RiceanPtr create(double maxVelocity, double k); virtual double fadingFactor(const WirelessCommSignal& signal, const NodeId& nodeId); protected: Ricean(); Ricean(double maxVelocity, double k); Ricean(const Ricean& rhs); static const double m_DEFAULT_MAX_VELOCITY; private: static const double m_DEFAULT_K; static const t_uint m_NUMBER_OF_POINTS; static const double m_MAX_DOPPLER_FREQUENCY; static const double m_MAX_SAMPLE_RATE; static const double m_GAUSSIAN_DATA1[]; static const double m_GAUSSIAN_DATA2[]; double m_maxVelocity; double m_kParameter; Ricean& operator= (const Ricean& rhs); }; typedef boost::shared_ptr<Ricean> RiceanPtr; class Rayleigh : public Ricean { public: typedef boost::shared_ptr<Rayleigh> RayleighPtr; static inline RayleighPtr create(); static inline RayleighPtr create(const Rayleigh& rhs); static inline RayleighPtr create(double maxVelocity); protected: Rayleigh(); Rayleigh(double maxVelocity); Rayleigh(const Rayleigh& rhs); private: Rayleigh& operator= (const Rayleigh& rhs); }; typedef boost::shared_ptr<Rayleigh> RayleighPtr; // Inline Functions inline RiceanPtr Ricean::create() { RiceanPtr p(new Ricean()); return p; } inline RiceanPtr Ricean::create(double maxVelocity, double k) { RiceanPtr p(new Ricean(maxVelocity, k)); return p; } inline RiceanPtr Ricean::create(const Ricean& rhs) { RiceanPtr p(new Ricean(rhs)); return p; } inline RayleighPtr Rayleigh::create() { RayleighPtr p(new Rayleigh()); return p; } inline RayleighPtr Rayleigh::create(double maxVelocity) { RayleighPtr p(new Rayleigh(maxVelocity)); return p; } inline RayleighPtr Rayleigh::create(const Rayleigh& rhs) { RayleighPtr p(new Rayleigh(rhs)); return p; } // Overloaded Operators #endif // FADING_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -