C++ main module for stochmagnet Package  1.0
SMS_BoostRandomFunction.h
Go to the documentation of this file.
1 #ifndef SMS_BoostRandomFunction_H
2 #define SMS_BoostRandomFunction_H
3 
4 //inherits header
5 #include "SM_Object.h"
6 
7 //generator number header
8 #include <boost/random/mersenne_twister.hpp>
9 
10 
17 // boost::mt19937
18 // boost::ecuyer1988
19 // boost::minstd_rand
20 // boost::rand48
21 typedef boost::mt19937 RNGType;
22 
23 class SMS_BoostRandomFunction : public virtual SM_Object {
24  // ATTRIBUTES
25 
26 private:
27  // Generator of pseudo number method
28 
31 
32 
33 private:
34 
35 
36  // ASSOCIATIONS
37 
38 
39 protected:
40  // METHODS
41 
42  // CONSTRUCTORS
43 
46 
47 
48 
49  // DESTRUCTORS
50 
51 
54  virtual ~SMS_BoostRandomFunction(void);
55 
56 
57 
58 public:
59 
60 
61  //MEMORY
62 
76  virtual tMemSize getMemorySize() const {
77  return sizeof(*this)+getContentsMemorySize();
78  }
79 
80 
81  //----------------
82  // NEW constructors
83  // ---------------
84 
87  inline RNGType& getRNGenerator() {
88  return mRNGenerator;
89  };
90 
93  static void initSeed();
94 
97  static void initSeed(const tULLInt& v);
98 
99 
100 };
101 
102 #endif
boost::mt19937 RNGType
Definition: SMS_BoostRandomFunction.h:21
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:259
This class is the class to describes general distribution.
Definition: SMS_BoostRandomFunction.h:23
static tBoolean INIT_SEED
Definition: SMS_BoostRandomFunction.h:30
static void initSeed()
init the seed
Definition: SMS_BoostRandomFunction.cpp:22
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMS_BoostRandomFunction.h:76
virtual ~SMS_BoostRandomFunction(void)
destroy an object.
Definition: SMS_BoostRandomFunction.cpp:13
static RNGType mRNGenerator
Definition: SMS_BoostRandomFunction.h:29
SMS_BoostRandomFunction(void)
create an object
Definition: SMS_BoostRandomFunction.cpp:8
RNGType & getRNGenerator()
get the generator
Definition: SMS_BoostRandomFunction.h:87
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:19
#define tULLInt
Definition: types.h:58
#define tMemSize
Definition: types.h:166
#define tBoolean
Definition: types.h:151