C++ mpi module for stochmagnet_main Package
SM_StochasticFunctionsInterface.h
1 #ifndef SM_StochasticFunctionsInterface_H
2 #define SM_StochasticFunctionsInterface_H
3 
4 #include "SM_Object.h"
5 
19 
20  // ATTRIBUTES
21 
22 public:
23 
24 
25 
26 private:
27 
28  static tBoolean IS_THREAD_SAFE;
29 
30 protected:
31  // METHODS
32 
33  // CONSTRUCTORS
34 
38 
39  }
40 private:
46 
47  }
48 
49 
50 
51  // DESTRUCTORS
52 protected:
53 
57  }
58 
59 
60 
61 public:
62  //MEMORY
63 
77  virtual tMemSize getMemorySize() const {
78  return sizeof(*this)+getContentsMemorySize();
79  }
80 
81 
82 public:
83 
84 
85  // SET & GET methods
86  // =================
87 
88 
89 
93  virtual void setSeed(const tULLInt& seed)=0;
94 
97  virtual void setSeed()=0;
98 
103  virtual void jump(const tInteger& jumps,const tULLInt& seed)=0;
104 
105 
106  //random methods
107  //==============
108 
112  virtual tReal normalRandom()=0;
113 
117  virtual tReal uniformRandom()=0;
118 
119 
120 
123  inline static tBoolean IsThreadSafe() {
124  return IS_THREAD_SAFE;
125  }
126 
127 
128 
129 protected:
130 
134  inline static void SetIsThreadSafe(const tBoolean& b) {
135  IS_THREAD_SAFE=b;
136  }
137 
138 };
139 
140 #endif
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:36
This class describes a stochastic functions based on same random number generator which implement ran...
Definition: SM_StochasticFunctionsInterface.h:18
SM_StochasticFunctionsInterface(void)
create
Definition: SM_StochasticFunctionsInterface.h:37
virtual tReal normalRandom()=0
compute a normal random number
virtual void jump(const tInteger &jumps, const tULLInt &seed)=0
jump a number of virtual random number generator
static tBoolean IsThreadSafe()
set if the stochastic function is thread safe
Definition: SM_StochasticFunctionsInterface.h:123
virtual ~SM_StochasticFunctionsInterface(void)
destroy
Definition: SM_StochasticFunctionsInterface.h:56
static void SetIsThreadSafe(const tBoolean &b)
set if the sochastic function is thread safe
Definition: SM_StochasticFunctionsInterface.h:134
virtual tReal uniformRandom()=0
compute a uniform random number in [0,1]
virtual void setSeed()=0
set seed
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_StochasticFunctionsInterface.h:77
virtual void setSeed(const tULLInt &seed)=0
void set seed