C++ mpi module for stochmagnet_main Package
TRNG_MRG2.h
1 #ifndef TRNG_MRG2_H
2 #define TRNG_MRG2_H
3 
4 
5 //base class header
6 #include "TRNG_ParallelRandomNumberGenerator.h"
7 
8 //generatoor header
9 #include "trng/mrg2.hpp"
10 
21 class TRNG_MRG2 : public TRNG_ParallelRandomNumberGenerator<int32_t,trng::mrg2, TRNG_MRG2> {
22 
23  //attributes
24 private:
25 
26 
27  //self class
28  typedef TRNG_MRG2 Self;
29  //main super class
31 
32 
33 public:
34  // CONSTRUCTORS
37  TRNG_MRG2(void) {
38  }
39 
40 
41  // DESTRUCTORS
44  virtual ~TRNG_MRG2(void) {
45  }
46 
47 
48 public :
49  // CREATE class
50 
51 
52  //SET & GET methods
53 
67  virtual tMemSize getMemorySize() const {
68  return sizeof(*this)+getContentsMemorySize();
69  }
70 
79  virtual tMemSize getContentsMemorySize() const {
80  tMemSize mem=SuperSelf::getContentsMemorySize();
81  return mem;
82  }
83 
84 
85 public:
86 
87  //New class Factory
91  inline static CORE_UniquePointer<Self> New() {
92  return CORE_UniquePointer<Self>(new Self(),Self::Delete());
93  }
94 
95 
96 
97 
98 };
99 
100 
101 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class generates a random number generator by process.
Definition: TRNG_MRG2.h:21
TRNG_MRG2(void)
create the class
Definition: TRNG_MRG2.h:37
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: TRNG_MRG2.h:79
virtual ~TRNG_MRG2(void)
destroy the class
Definition: TRNG_MRG2.h:44
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: TRNG_MRG2.h:67
static CORE_UniquePointer< Self > New()
build a new instance of default class factory
Definition: TRNG_MRG2.h:91
This class generates a parallel random number of type T generator with implement class I by process.
Definition: TRNG_ParallelRandomNumberGenerator.h:14
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: TRNG_ParallelRandomNumberGenerator.h:72