Virtual Belgium  2.0
A micro-simulation platform for the Belgian population
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
MixtureLogNormal Struct Reference

Fast Random number generator for mixture of log-normal distribution (Numerical Recipes). More...

#include <Random.hpp>

Public Member Functions

 MixtureLogNormal (unsigned long long i)
 Constructor. More...
 
float dev (std::vector< float > mu, std::vector< float > sigma, std::vector< float > p)
 Returns a draw from the mixture distribution. More...
 
float dev (std::vector< float > mu, std::vector< float > sigma, std::vector< float > p, float max)
 Returns a draw from the mixture distribution. More...
 
float dev (std::vector< float > mu, std::vector< float > sigma, std::vector< float > p, float min, float max)
 Returns a draw from the mixture distribution. More...
 
- Public Member Functions inherited from LogNormaldev
 LogNormaldev (unsigned long long i)
 Constructor. More...
 
float dev (double mu, double sigma)
 Returns a Log-normal random draw. More...
 
float dev (double mu, double sigma, float max)
 Returns a bounded Log-normal random draw. More...
 
float dev (double mu, double sigma, float min, float max)
 Returns a bounded Log-normal random draw. More...
 
- Public Member Functions inherited from Ranfib
 Ranfib (unsigned long j)
 Constructor. More...
 
double doub ()
 Returns random double-precision floating point value in [0,1]. More...
 
float fl ()
 Returns random simple-precision floating point value in [0,1]. More...
 

Additional Inherited Members

- Public Attributes inherited from Ranfib
double dtab [55]
 part of the generator state More...
 
double dd
 part of the generator state More...
 
int inext
 part of the generator state More...
 
int inextp
 part of the generator state More...
 

Detailed Description

Fast Random number generator for mixture of log-normal distribution (Numerical Recipes).

Constructor & Destructor Documentation

MixtureLogNormal::MixtureLogNormal ( unsigned long long  i)
inline

Constructor.

Member Function Documentation

float MixtureLogNormal::dev ( std::vector< float >  mu,
std::vector< float >  sigma,
std::vector< float >  p 
)
inline

Returns a draw from the mixture distribution.

Parameters
muvector of means
sigmavector of standart deviations
pvector of mixing proportions
Returns
a random number
float MixtureLogNormal::dev ( std::vector< float >  mu,
std::vector< float >  sigma,
std::vector< float >  p,
float  max 
)
inline

Returns a draw from the mixture distribution.

Parameters
muvector of means
sigmavector of standart deviations
pvector of mixing proportions
maxupper bound of the distribution
Returns
a random number
float MixtureLogNormal::dev ( std::vector< float >  mu,
std::vector< float >  sigma,
std::vector< float >  p,
float  min,
float  max 
)
inline

Returns a draw from the mixture distribution.

Parameters
muvector of means
sigmavector of standart deviations
pvector of mixing proportions
maxupper bound of the distribution
minlower bound of the distribution
Returns
a random number

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