RobWorkProject  24.5.15-
Static Public Member Functions | List of all members
Random Class Reference

Generation of random numbers. More...

#include <Random.hpp>

Static Public Member Functions

static double ran ()
 A random double in the range [0, 1[ using a uniform distribution. More...
 
static void seed (unsigned seed)
 Seeds the random number generator. More...
 
static void seed ()
 Seeds the random number generator with current time of day. More...
 
static double ran (double from, double to)
 A random double in the range [from, to[ using a uniform distribution. More...
 
static int ranI (int from, int to)
 A random integer in the range [from, to[ using a uniform distribution. More...
 
static double ranNormalDist (double mean, double sigma)
 Returns a random sample around mean with standard deviation sigma using the normal distribution. More...
 
template<typename T >
static T ranT (const T &from, const T &to)
 
template<typename T >
static T ranT (double from, double to, unsigned int size)
 

Detailed Description

Generation of random numbers.

Member Function Documentation

◆ ran() [1/2]

static double ran ( )
static

A random double in the range [0, 1[ using a uniform distribution.

Note
Uses boost::random

◆ ran() [2/2]

static double ran ( double  from,
double  to 
)
static

A random double in the range [from, to[ using a uniform distribution.

Note
Uses boost::random

◆ ranI()

static int ranI ( int  from,
int  to 
)
static

A random integer in the range [from, to[ using a uniform distribution.

Note
Uses boost::random

◆ ranNormalDist()

static double ranNormalDist ( double  mean,
double  sigma 
)
static

Returns a random sample around mean with standard deviation sigma using the normal distribution.

Note
Uses boost::random
Parameters
mean[in] Means value
sigma[in] Standard deviation
Returns
Random sample

◆ seed() [1/2]

static void seed ( )
static

Seeds the random number generator with current time of day.

Note
Uses boost::random

◆ seed() [2/2]

static void seed ( unsigned  seed)
static

Seeds the random number generator.

Note
Uses boost::random

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