C++ main module for stochmagnet Package  1.0
SM_TemplatedNoiseRateFunction.h
Go to the documentation of this file.
1 #ifndef SM_TemplatedNoiseRateFunction_H
2 #define SM_TemplatedNoiseRateFunction_H
3 
4 #include "SM_NoiseRateFunction.h"
5 
13 template<class DerivedClass>
15 
16  // ATTRIBUTES
17 
18 public:
19 
20 
21 
22 private:
23 
24 
25 
26 protected:
27  // METHODS
28 
29  // CONSTRUCTORS
30 
34 
35  }
36 private:
42 
43  }
44 
45 
46 
47  // DESTRUCTORS
48 protected:
49 
53  }
54 
55 
56 public:
57 
58 
59  //MEMORY
60 
74  virtual tMemSize getMemorySize() const {
75  return sizeof(*this)+getContentsMemorySize();
76  }
77 
78  // SET methods
79 
80 
81 
82 
83 
84 public:
85  // OTHERS methods
86 
91  inline tReal computeTemplatedFunction(const tReal& t) const {
92  return static_cast<const DerivedClass*>(this)->computeTemplatedFunction(t);
93  }
94 
95 
96 
97 
98 
99 };
100 
101 #endif
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:259
This class describes a noise rate function.
Definition: SM_NoiseRateFunction.h:13
This class describes a templated noise rate function as static polymorphism.
Definition: SM_TemplatedNoiseRateFunction.h:14
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_TemplatedNoiseRateFunction.h:74
tReal computeTemplatedFunction(const tReal &t) const
compute the noise rate function by static polymorphism
Definition: SM_TemplatedNoiseRateFunction.h:91
SM_TemplatedNoiseRateFunction(const SM_TemplatedNoiseRateFunction< DerivedClass > &f)
create a copy of instance of function f
Definition: SM_TemplatedNoiseRateFunction.h:41
SM_TemplatedNoiseRateFunction(void)
create
Definition: SM_TemplatedNoiseRateFunction.h:33
virtual ~SM_TemplatedNoiseRateFunction(void)
destroy
Definition: SM_TemplatedNoiseRateFunction.h:52
#define tMemSize
Definition: types.h:166
#define tReal
Definition: types.h:137