C++ main module for stochmagnet Package  1.0
SM_ConstantNoiseRateFunction.h
Go to the documentation of this file.
1 #ifndef SM_ConstantNoiseRateFunction_H
2 #define SM_ConstantNoiseRateFunction_H
3 
5 
13 class SM_ConstantNoiseRateFunction : public SM_TemplatedNoiseRateFunction<SM_ConstantNoiseRateFunction> {
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 
57 
64  }
65 
66  //MEMORY
67 
81  virtual tMemSize getMemorySize() const {
82  return sizeof(*this)+getContentsMemorySize();
83  }
84 
85 
86  // GET methods
87  // ============
88 
91  virtual tString getName() const override{
92  return "ConstantFunction";
93  }
94 
95 
96 public:
97  // OTHERS methods
98 
103  inline tReal computeTemplatedFunction(const tReal& t) const {
104  return getNoiseRate();
105  }
106 
111  virtual tReal computeFunction(const tReal& t) const override {
112  return computeTemplatedFunction(t);
113  }
114 
115 
116 
117 };
118 
119 #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_ConstantNoiseRateFunction.h:13
static CORE_UniquePointer< SM_ConstantNoiseRateFunction > New()
build a new instance of a SM_NoiseRateFunction
Definition: SM_ConstantNoiseRateFunction.h:61
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_ConstantNoiseRateFunction.h:81
tReal computeTemplatedFunction(const tReal &t) const
compute the noise rate function
Definition: SM_ConstantNoiseRateFunction.h:103
virtual tReal computeFunction(const tReal &t) const override
compute the noise rate function
Definition: SM_ConstantNoiseRateFunction.h:111
virtual ~SM_ConstantNoiseRateFunction(void)
destroy
Definition: SM_ConstantNoiseRateFunction.h:51
SM_ConstantNoiseRateFunction(void)
create
Definition: SM_ConstantNoiseRateFunction.h:32
SM_ConstantNoiseRateFunction(const SM_ConstantNoiseRateFunction &f)
create a copy of instance of f
Definition: SM_ConstantNoiseRateFunction.h:40
virtual tString getName() const override
the the name of the system
Definition: SM_ConstantNoiseRateFunction.h:91
const tReal & getNoiseRate() const
get the noise rate
Definition: SM_NoiseRateFunction.h:96
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