Static Public Member Functions | Static Private Attributes
DUtils::Random Class Reference

#include <Random.h>

List of all members.

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.

Detailed Description

Definition at line 32 of file include/re_vision/Random.h.


Member Function Documentation

template<class T >
static T DUtils::Random::RandomGaussianValue ( T  mean,
T  sigma 
) [inline, static]

Returns a random number from a gaussian distribution

Parameters:
mean
sigmastandard 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]

Parameters:
min
max
Returns:
random int in [min..max]

Definition at line 61 of file Random.cpp.

template<class T >
static T DUtils::Random::RandomValue ( ) [inline, static]

Returns a random number in the range [0..1]

Returns:
random T number in [0..1]

Definition at line 64 of file include/re_vision/Random.h.

template<class T >
static T DUtils::Random::RandomValue ( T  min,
T  max 
) [inline, static]

Returns a random number in the range [min..max]

Parameters:
min
max
Returns:
random T number in [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]

Sets the given random number seed

Parameters:
seed

Definition at line 47 of file Random.cpp.

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

Parameters:
seed

Definition at line 52 of file Random.cpp.


Member Data Documentation

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.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:29