C++ mpi module for stochmagnet_main Package
Public Member Functions | Protected Member Functions | List of all members
RAND_RandomNumberDistribution< T, I, D > Class Template Reference

This class generates a distribution implemented in class G with internal implementation class I with result type T. More...

#include <RAND_RandomNumberDistribution.h>

Inheritance diagram for RAND_RandomNumberDistribution< T, I, D >:
Inheritance graph
[legend]
Collaboration diagram for RAND_RandomNumberDistribution< T, I, D >:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations More...
 
template<typename T1 , class G , class D1 >
random (RAND_RandomNumberGenerator< T1, G, D1 > &generator)
 random a number More...
 
I & getDistribution ()
 get distribution More...
 
minValue () const
 return the min value
 
maxValue () const
 return the max value
 
tReal pdf (const T &x) const
 return the probility density function More...
 
tReal cdf (const T &x) const
 return the cumulative density function More...
 
tReal icdf (const T &y) const
 return the inverse of the cumulative density function More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Protected Member Functions

 RAND_RandomNumberDistribution (void)
 create
 
virtual ~RAND_RandomNumberDistribution (void)
 destroy
 
void initialize (I &dist)
 initiliaze generator
 
- Protected Member Functions inherited from RAND_Object
 RAND_Object (void)
 create the class
 
virtual ~RAND_Object (void)
 delete the class
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Additional Inherited Members

- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Detailed Description

template<typename T, class I, class D>
class RAND_RandomNumberDistribution< T, I, D >

This class generates a distribution implemented in class G with internal implementation class I with result type T.

Author
Stephane Despreaux
Version
2.0

Member Function Documentation

◆ cdf()

template<typename T , class I , class D >
tReal RAND_RandomNumberDistribution< T, I, D >::cdf ( const T &  x) const
inline

return the cumulative density function

Parameters
[in]xvalue of the antecedent

◆ getContentsMemorySize()

template<typename T , class I , class D >
virtual tMemSize RAND_RandomNumberDistribution< T, I, D >::getContentsMemorySize ( ) const
inlinevirtual

return nthe memory size of the included associations

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

Reimplemented from RAND_Object.

Reimplemented in TRNG_RandomNumberDistribution< T, I, D >, TRNG_RandomNumberDistribution< int, trng::uniform_int_dist, TRNG_UniformIntDistribution >, RNDSTD_UniformRealDistribution, RNDSTD_UniformIntDistribution, RNDSTD_NormalDistribution, RNDB_UniformRealDistribution, RNDB_UniformIntDistribution, RNDB_Uniform01Distribution, and RNDB_NormalDistribution.

◆ getDistribution()

template<typename T , class I , class D >
I& RAND_RandomNumberDistribution< T, I, D >::getDistribution ( )
inline

get distribution

Returns
the internal distribution

◆ getMemorySize()

template<typename T , class I , class D >
virtual tMemSize RAND_RandomNumberDistribution< T, I, D >::getMemorySize ( ) const
inlinevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes The mamory size is :
  • the added size of the base classes which contains:
    • the primary attributes size depends on the order: (first delare the smallest attributes size
    • all virtual functions costs <pointer-size> (4 32xor 8 64x) bytes by virtual function
    • virtual inherihtance will increase of (4 or 8) bytes
  • we add the size of the contains values of the attributes : for example the size of a string is the length of the string 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from RAND_Object.

Reimplemented in TRNG_RandomNumberDistribution< T, I, D >, TRNG_RandomNumberDistribution< int, trng::uniform_int_dist, TRNG_UniformIntDistribution >, RNDSTD_UniformRealDistribution, RNDSTD_UniformIntDistribution, RNDSTD_NormalDistribution, RNDB_UniformRealDistribution, RNDB_UniformIntDistribution, RNDB_Uniform01Distribution, and RNDB_NormalDistribution.

◆ icdf()

template<typename T , class I , class D >
tReal RAND_RandomNumberDistribution< T, I, D >::icdf ( const T &  y) const
inline

return the inverse of the cumulative density function

Parameters
[in]yvalue of the image

◆ pdf()

template<typename T , class I , class D >
tReal RAND_RandomNumberDistribution< T, I, D >::pdf ( const T &  x) const
inline

return the probility density function

Parameters
[in]xvalue of the antecedent

◆ random()

template<typename T , class I , class D >
template<typename T1 , class G , class D1 >
T RAND_RandomNumberDistribution< T, I, D >::random ( RAND_RandomNumberGenerator< T1, G, D1 > &  generator)
inline

random a number

Parameters
[in]generator: random number generator

The documentation for this class was generated from the following file: