C++ mpi module for stochmagnet_main Package
RNDB_Uniform01Distribution.h
1 #ifndef RNDB_Uniform01Distribution_H
2 #define RNDB_Uniform01Distribution_H
3 
4 //inherited class
5 #include "RAND_RandomNumberDistribution.h"
6 
7 //boost header
8 #include <boost/random/uniform_01.hpp>
9 
15 class RNDB_Uniform01Distribution : public RAND_RandomNumberDistribution<tReal,boost::random::uniform_01<tReal>,RNDB_Uniform01Distribution> {
16  // ATTRIBUTES
17 
18 private:
19 
20  //type of the return value of the distribution
21  typedef tReal T;
22  //self class
24  //super class
26 
27 public:
28  // METHODS
29 
30  // CONSTRUCTORS
31 
34  boost::random::uniform_01<T> dist;
35  initialize(dist);
36  }
37 
38 
39 
40  // DESTRUCTORS
41 
42 
46  }
47 
48 
49 
50 public:
51 
55  inline static CORE_UniquePointer<RNDB_Uniform01Distribution> New() {
56  return CORE_UniquePointer<RNDB_Uniform01Distribution>(new RNDB_Uniform01Distribution(),
58  }
59 
60 private:
61 
62  public:
63 
64  //MEMORY
78  virtual tMemSize getMemorySize() const {
79  return sizeof(*this)+getContentsMemorySize();
80  }
81 
90  virtual tMemSize getContentsMemorySize() const {
91  tMemSize mem= SuperSelf::getContentsMemorySize();
92  return mem;
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 distribution implemented in class G with internal implementation class I with ...
Definition: RAND_RandomNumberDistribution.h:17
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: RAND_RandomNumberDistribution.h:88
void initialize(boost::random::uniform_01< tReal > &dist)
initiliaze generator
Definition: RAND_RandomNumberDistribution.h:103
This class implements a an uniform real law distribution in [0,1[ with the boost library.
Definition: RNDB_Uniform01Distribution.h:15
static CORE_UniquePointer< RNDB_Uniform01Distribution > New()
build a new instance of the stochasticfunction
Definition: RNDB_Uniform01Distribution.h:55
virtual ~RNDB_Uniform01Distribution(void)
destroy an object.
Definition: RNDB_Uniform01Distribution.h:45
RNDB_Uniform01Distribution()
create an object
Definition: RNDB_Uniform01Distribution.h:33
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: RNDB_Uniform01Distribution.h:78
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: RNDB_Uniform01Distribution.h:90