All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Static Public Member Functions | List of all members
ignition::math::Rand Class Reference

Random number generator class. More...

#include <ignition/math/Rand.hh>

Static Public Member Functions

static double DblNormal (double _mean=0, double _sigma=1)
 Get a double from a normal distribution. More...
 
static double DblUniform (double _min=0, double _max=1)
 Get a double from a uniform distribution. More...
 
static int32_t IntNormal (int _mean, int _sigma)
 Get a double from a normal distribution. More...
 
static int32_t IntUniform (int _min, int _max)
 Get a integer from a uniform distribution. More...
 
static void Seed (unsigned int _seed)
 Set the seed value. More...
 
static unsigned int Seed ()
 Get the seed value. More...
 

Detailed Description

Random number generator class.

Member Function Documentation

static double ignition::math::Rand::DblNormal ( double  _mean = 0,
double  _sigma = 1 
)
static

Get a double from a normal distribution.

Parameters
[in]_meanMean value for the distribution
[in]_sigmaSigma value for the distribution
static double ignition::math::Rand::DblUniform ( double  _min = 0,
double  _max = 1 
)
static

Get a double from a uniform distribution.

Parameters
[in]_minMinimum bound for the random number
[in]_maxMaximum bound for the random number
static int32_t ignition::math::Rand::IntNormal ( int  _mean,
int  _sigma 
)
static

Get a double from a normal distribution.

Parameters
[in]_meanMean value for the distribution
[in]_sigmaSigma value for the distribution
static int32_t ignition::math::Rand::IntUniform ( int  _min,
int  _max 
)
static

Get a integer from a uniform distribution.

Parameters
[in]_minMinimum bound for the random number
[in]_maxMaximum bound for the random number
static void ignition::math::Rand::Seed ( unsigned int  _seed)
static

Set the seed value.

Parameters
[in]_seedThe seed used to initialize the randon number generator.
static unsigned int ignition::math::Rand::Seed ( )
static

Get the seed value.

Returns
The seed value used to initialize the random number generator.

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