C++ main module for stochmagnet Package  1.0
SM_InverseNoiseRateFunction.h
Go to the documentation of this file.
1 #ifndef SM_InverseNoiseRateFunction_H
2 #define SM_InverseNoiseRateFunction_H
3 
5 
13 class SM_InverseNoiseRateFunction : public SM_TemplatedNoiseRateFunction<SM_InverseNoiseRateFunction> {
14 
15 
16  // ATTRIBUTES
17 
18 public:
19 
20 
21 
22 private:
23 
24 
25 public:
26  // METHODS
27 
28  // CONSTRUCTORS
29 
33  }
34 
35 private:
41 
42  }
43 
44 public:
45 
46  // DESTRUCTORS
47 
48 
52  }
53 
54 
55 public:
56 
63  }
64 
65 
66 
67 
68  //MEMORY
69 
83  virtual tMemSize getMemorySize() const {
84  return sizeof(*this)+getContentsMemorySize();
85  }
86 
87  // SET methods
88 
89 
90 
91 
92  // GET methods
93  // ============
94 
97  virtual tString getName() const override{
98  return "InverseFunction";
99  }
100 
101 
102 public:
103  // OTHERS methods
104 
109  inline tReal computeTemplatedFunction(const tReal& t) const {
110  return getNoiseRate()/pow(t+1,getNoisePower());
111  }
112 
117  virtual tReal computeFunction(const tReal& t) const override {
118  return computeTemplatedFunction(t);
119  }
120 
121 
122 };
123 
124 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:94
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:259
This class describes an noise rate function of the form .
Definition: SM_InverseNoiseRateFunction.h:13
virtual tReal computeFunction(const tReal &t) const override
compute the noise rate function
Definition: SM_InverseNoiseRateFunction.h:117
SM_InverseNoiseRateFunction(const SM_NoiseRateFunction &f)
create a copy of instance of f
Definition: SM_InverseNoiseRateFunction.h:40
virtual tString getName() const override
the the name of the system
Definition: SM_InverseNoiseRateFunction.h:97
tReal computeTemplatedFunction(const tReal &t) const
compute the noise rate function
Definition: SM_InverseNoiseRateFunction.h:109
virtual ~SM_InverseNoiseRateFunction(void)
destroy
Definition: SM_InverseNoiseRateFunction.h:51
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_InverseNoiseRateFunction.h:83
static CORE_UniquePointer< SM_InverseNoiseRateFunction > New()
build a new instance of a SM_NoiseRateFunction
Definition: SM_InverseNoiseRateFunction.h:60
SM_InverseNoiseRateFunction(void)
create
Definition: SM_InverseNoiseRateFunction.h:32
This class describes a noise rate function.
Definition: SM_NoiseRateFunction.h:13
const tReal & getNoiseRate() const
get the noise rate
Definition: SM_NoiseRateFunction.h:96
const tReal & getNoisePower() const
get the noise power
Definition: SM_NoiseRateFunction.h:108
This class describes a templated noise rate function as static polymorphism.
Definition: SM_TemplatedNoiseRateFunction.h:14
typename std::unique_ptr< T, CORE_Object::Delete > CORE_UniquePointer
Definition: sp.h:8
#define tString
Definition: types.h:147
#define tMemSize
Definition: types.h:166
#define tReal
Definition: types.h:137