Image Component Library (ICL)
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.
void icl::utils::randomSeed ()
 Initilaize the random number generator (with Time::now().toMicroSeconds()).
double icl::utils::random (double max=1)
 Generates random numbers in range [0,1].
double icl::utils::random (double min, double max)
 Generate a random number in range [min,max].
unsigned int icl::utils::random (unsigned int max)
 Creates a non-negative random number in range [0,max].
ICLUtils_API double icl::utils::gaussRandom (double mean, double var)
 Generate a gaussian random number with given mean and variance.
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.

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()).

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines