#include <Random.h>
Static Public Member Functions | |
template<class T > | |
static T | RandomGaussianValue (T mean, T sigma) |
static int | RandomInt (int min, int max) |
template<class T > | |
static T | RandomValue () |
template<class T > | |
static T | RandomValue (T min, T max) |
static void | SeedRand () |
static void | SeedRand (int seed) |
static void | SeedRandOnce () |
static void | SeedRandOnce (int seed) |
Static Private Attributes | |
static bool | m_seeded_current_time = false |
If SeedRandOnce() has already been called. | |
static bool | m_seeded_int = false |
If SeedRandOnce(int) has already been called. |
Definition at line 32 of file include/re_vision/Random.h.
static T DUtils::Random::RandomGaussianValue | ( | T | mean, |
T | sigma | ||
) | [inline, static] |
Returns a random number from a gaussian distribution
mean | |
sigma | standard deviation |
Definition at line 93 of file include/re_vision/Random.h.
int DUtils::Random::RandomInt | ( | int | min, |
int | max | ||
) | [static] |
Returns a random int in the range [min..max]
min | |
max |
Definition at line 61 of file Random.cpp.
static T DUtils::Random::RandomValue | ( | ) | [inline, static] |
Returns a random number in the range [0..1]
Definition at line 64 of file include/re_vision/Random.h.
static T DUtils::Random::RandomValue | ( | T | min, |
T | max | ||
) | [inline, static] |
Returns a random number in the range [min..max]
min | |
max |
Definition at line 75 of file include/re_vision/Random.h.
void DUtils::Random::SeedRand | ( | ) | [static] |
Sets the random number seed to the current time
Definition at line 32 of file Random.cpp.
void DUtils::Random::SeedRand | ( | int | seed | ) | [static] |
void DUtils::Random::SeedRandOnce | ( | ) | [static] |
Sets the random number seed to the current time only the first time this function is called
Definition at line 38 of file Random.cpp.
void DUtils::Random::SeedRandOnce | ( | int | seed | ) | [static] |
Sets the given random number seed only the first time this function is called
seed |
Definition at line 52 of file Random.cpp.
bool DUtils::Random::m_seeded_current_time = false [static, private] |
If SeedRandOnce() has already been called.
Definition at line 113 of file include/re_vision/Random.h.
bool DUtils::Random::m_seeded_int = false [static, private] |
If SeedRandOnce(int) has already been called.
Definition at line 116 of file include/re_vision/Random.h.