C++ mpi module for stochmagnet_main Package
SM_MultiStochasticFunctionsInterface.h
1 #ifndef SM_MultiStochasticFunctionsInterface_H
2 #define SM_MultiStochasticFunctionsInterface_H
3 
4 //base class header
5 #include "SM_Object.h"
6 
7 //stochastic functions header
8 #include "SM_StochasticFunctionsInterface.h"
9 
10 
19 
20  // ATTRIBUTES
21 
22 public:
23 
24 
25 
26 private:
28  typedef SM_Object SuperClass;
29 
30 
31 
32 protected:
33  // METHODS
34 
35  // CONSTRUCTORS
36 
40 
41  }
42 private:
43 
44 
45 
46 
47  // DESTRUCTORS
48 protected:
49 
53  }
54 
55 
56 
57 public:
58  //MEMORY
59 
73  virtual tMemSize getMemorySize() const {
74  return sizeof(*this)+getContentsMemorySize();
75  }
76 
85  virtual tMemSize getContentsMemorySize() const {
86  tMemSize mem=SuperClass::getContentsMemorySize();
87  return mem;
88  }
89 public:
90 
91 
92 public:
96  virtual SM_StochasticFunctionsInterface& operator()(const tInteger& threadId)=0;
97 
98 
99  // SET & GET methods
100  // =================
101 
105  virtual tInteger getSize() const=0;
106 
110  virtual void setSeed(const tULLInt& seed)=0;
111 
114  virtual void setSeed()=0;
115 
120  virtual void randomSeed(const tInteger& coresNumber,const tInteger& coreIndex)=0;
121 
128  virtual void jump(const tInteger& coresNumber,const tInteger& coreIndex,
129  const tULLInt& jumpsNumber,const tULLInt& nRNGs)=0;
130 
131 
132 
136  inline tBoolean isThreadSafe() const {
137  return (getSize()>1);
138  }
139 
140 
141 
142 
143 
144 
145 };
146 
147 #endif
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class describes a multi stochastic functions based on same random number generator which impleme...
Definition: SM_MultiStochasticFunctionsInterface.h:18
SM_MultiStochasticFunctionsInterface(void)
create
Definition: SM_MultiStochasticFunctionsInterface.h:39
virtual SM_StochasticFunctionsInterface & operator()(const tInteger &threadId)=0
operator for getting stochatic function at thread id
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_MultiStochasticFunctionsInterface.h:73
virtual void setSeed(const tULLInt &seed)=0
void set seed
virtual void setSeed()=0
set seed
virtual void randomSeed(const tInteger &coresNumber, const tInteger &coreIndex)=0
jump a number of virtual random number generator
virtual ~SM_MultiStochasticFunctionsInterface(void)
destroy
Definition: SM_MultiStochasticFunctionsInterface.h:52
virtual void jump(const tInteger &coresNumber, const tInteger &coreIndex, const tULLInt &jumpsNumber, const tULLInt &nRNGs)=0
jump a number of virtual random number generator
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: SM_MultiStochasticFunctionsInterface.h:85
tBoolean isThreadSafe() const
return true if the random method can be parallelized
Definition: SM_MultiStochasticFunctionsInterface.h:136
virtual tInteger getSize() const =0
get the number of stochastic functions
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