C++ mpi module for stochmagnet_main Package
TRNG_RandomNumberDistribution.h
1 #ifndef TRNG_RandomNumberDistribution_H
2 #define TRNG_RandomNumberDistribution_H
3 
4 //base class header
5 #include "CORE_Object.h"
6 
7 //random number distribution header
8 #include "RAND_RandomNumberDistribution.h"
9 
10 
17 template<typename T,class I,class D>
19 
20  //attributes
21 private :
22 
23 
24  //class This
26 
27  //main super class
29 
30 
31 
32 public:
33  // CONSTRUCTORS
37  }
38 
39 
40  // DESTRUCTORS
44  }
45 
46 
47 public :
48 
62  virtual tMemSize getMemorySize() const {
63  return sizeof(*this)+getContentsMemorySize();
64  }
65 
74  virtual tMemSize getContentsMemorySize() const {
75  tMemSize mem=SuperSelf::getContentsMemorySize();
76  return mem;
77  }
78 
82  inline tReal pdf(const T& x) const {
83  return this->getDistribution().pdf(x);
84  }
88  inline tReal cdf(const T& x) const {
89  return this->getDistribution().cdf(x);
90  }
94  inline tReal icdf(const T& y) const {
95  return this->getDistribution().icdf(y);
96  }
97 
98 
99 
100 };
101 
102 
103 #endif
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
I & getDistribution()
get distribution
Definition: RAND_RandomNumberDistribution.h:124
This class generates a distribution of trng class I with result type T implemented in D class.
Definition: TRNG_RandomNumberDistribution.h:18
TRNG_RandomNumberDistribution(void)
create the class
Definition: TRNG_RandomNumberDistribution.h:36
tReal icdf(const T &y) const
return the inverse of the cumulative density function
Definition: TRNG_RandomNumberDistribution.h:94
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: TRNG_RandomNumberDistribution.h:74
tReal pdf(const T &x) const
return the probility density function
Definition: TRNG_RandomNumberDistribution.h:82
tReal cdf(const T &x) const
return the cumulative density function
Definition: TRNG_RandomNumberDistribution.h:88
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: TRNG_RandomNumberDistribution.h:62
virtual ~TRNG_RandomNumberDistribution(void)
destroy the class
Definition: TRNG_RandomNumberDistribution.h:43