C++ mpi module for stochmagnet_main Package
SM_StochasticFunctions.h
1 #ifndef SM_StochasticFunctions_H
2 #define SM_StochasticFunctions_H
3 
4 //super calss header
5 #include "SM_StochasticFunctionsInterface.h"
6 
24 template<class I>
26 
27  // ATTRIBUTES
28 
29 public:
30 
31 
32 
33 private:
34 
35 
36 
37 protected:
38  // METHODS
39 
40  // CONSTRUCTORS
41 
45 
46  }
47 private:
53 
54  }
55 
56 
57 
58  // DESTRUCTORS
59 protected:
60 
63  virtual ~SM_StochasticFunctions(void) {
64  }
65 
66 
67 
68 public:
69  //MEMORY
70 
84  virtual tMemSize getMemorySize() const override {
85  return sizeof(*this)+getContentsMemorySize();
86  }
87 
88 
89 public:
90 
91 
92  // GET methods
93  // ============
94 
98  virtual tReal normalRandom() final {
99  return scNormalRandom();
100  }
101 
105  virtual tReal uniformRandom() final {
106  return scUniformRandom();
107  }
108 
109 
110 
114  inline tReal scNormalRandom() {
115  return static_cast<I*>(this)->scNormalRandom();
116  }
117 
121  inline tReal scUniformRandom() {
122  return static_cast<I*>(this)->scUniformRandom();
123  }
124 
125 
126 
127 
128 
129 };
130 
131 #endif
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class describes a stochastic functions based on same random number generator which implement ran...
Definition: SM_StochasticFunctionsInterface.h:18
This class describes a stochastic functions with templated methods.
Definition: SM_StochasticFunctions.h:25
virtual tMemSize getMemorySize() const override
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_StochasticFunctions.h:84
tReal scNormalRandom()
compute a normal random number by static casting method
Definition: SM_StochasticFunctions.h:114
virtual ~SM_StochasticFunctions(void)
destroy
Definition: SM_StochasticFunctions.h:63
SM_StochasticFunctions(void)
create
Definition: SM_StochasticFunctions.h:44
virtual tReal normalRandom() final
compute a normal random number
Definition: SM_StochasticFunctions.h:98
tReal scUniformRandom()
compute a uniform random number in [0,1] bu static casting method
Definition: SM_StochasticFunctions.h:121
virtual tReal uniformRandom() final
compute a uniforn random number in [0,1]
Definition: SM_StochasticFunctions.h:105