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