C++ mpi module for stochmagnet_main Package
TRNG_MRG4.h
1 #ifndef TRNG_MRG4_H
2 #define TRNG_MRG4_H
3 
4 
5 //base class header
6 #include "TRNG_ParallelRandomNumberGenerator.h"
7 
8 //generatoor header
9 #include "trng/mrg4.hpp"
10 
21 class TRNG_MRG4 : public TRNG_ParallelRandomNumberGenerator<int32_t,trng::mrg4, TRNG_MRG4> {
22 
23  //attributes
24 private:
25 
26  typedef int32_t T;
27 
28  //self class
29  typedef TRNG_MRG4 Self;
30  //main super class
32 
33 
34 public:
35  // CONSTRUCTORS
38  TRNG_MRG4(void) {
39  }
40 
41 
42  // DESTRUCTORS
45  virtual ~TRNG_MRG4(void) {
46  }
47 
48 
49 public :
50  // CREATE class
51 
52 
53  //SET & GET methods
54 
68  virtual tMemSize getMemorySize() const {
69  return sizeof(*this)+getContentsMemorySize();
70  }
71 
80  virtual tMemSize getContentsMemorySize() const {
81  tMemSize mem=SuperSelf::getContentsMemorySize();
82  return mem;
83  }
84 
85 
86 public:
87 
88  //New class Factory
92  inline static CORE_UniquePointer<Self> New() {
93  return CORE_UniquePointer<Self>(new Self(),Self::Delete());
94  }
95 
96 
97 
98 
99 };
100 
101 
102 #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_MRG4.h:21
static CORE_UniquePointer< Self > New()
build a new instance of default class factory
Definition: TRNG_MRG4.h:92
TRNG_MRG4(void)
create the class
Definition: TRNG_MRG4.h:38
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: TRNG_MRG4.h:80
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: TRNG_MRG4.h:68
virtual ~TRNG_MRG4(void)
destroy the class
Definition: TRNG_MRG4.h:45
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