Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
Random Number Generation fuctions and classes

Classes

struct  icl::utils::RandomSeeder
 Object based random seed caller. More...
 

Functions

void icl::utils::randomSeed (long int seedval)
 Initilaize the random number generator. More...
 
void icl::utils::randomSeed ()
 Initilaize the random number generator (with Time::now().toMicroSeconds()). More...
 
double icl::utils::random (double max=1)
 Generates random numbers in range [0,1]. More...
 
double icl::utils::random (double min, double max)
 Generate a random number in range [min,max]. More...
 
unsigned int icl::utils::random (unsigned int max)
 Creates a non-negative random number in range [0,max]. More...
 
ICLUtils_API double icl::utils::gaussRandom (double mean, double var)
 Generate a gaussian random number with given mean and variance. More...
 
double icl::utils::gaussRandom (double mean, double var, const Range< double > &range)
 Generate a gaussian random number with given mean and variance and clips the result to a range. More...
 

Detailed Description

Function Documentation

ICLUtils_API double icl::utils::gaussRandom ( double  mean,
double  var 
)

Generate a gaussian random number with given mean and variance.

Parameters
meanmode of the gaussian
varvariance of the gaussian
Returns
gaussian distributed variable
See Also
double(double,double,const Range<double>&),
double icl::utils::gaussRandom ( double  mean,
double  var,
const Range< double > &  range 
)
inline

Generate a gaussian random number with given mean and variance and clips the result to a range.

Parameters
meanmode of the gaussian
varvariance of the gaussian
rangeclipping range for the returned value
Returns
gaussian distributed variable clipped to range range
See Also
double(double,double,const Range<double>&),
double icl::utils::random ( double  max = 1)
inline

Generates random numbers in range [0,1].

double icl::utils::random ( double  min,
double  max 
)
inline

Generate a random number in range [min,max].

Parameters
mina float argument. The lower intervall bound
maxa float argument. The upper interval bound
unsigned int icl::utils::random ( unsigned int  max)
inline

Creates a non-negative random number in range [0,max].

Parameters
maxThe upper limit for the returned number
void icl::utils::randomSeed ( long int  seedval)
inline

Initilaize the random number generator.

Parameters
seedvalThe seed value (e.g. time(0) ...)
void icl::utils::randomSeed ( )
inline

Initilaize the random number generator (with Time::now().toMicroSeconds()).