ddc
|
thread-safe pseudo-random number stream using drand48() & friends More...
#include <ddcRandom.h>
Public Member Functions | |
Constructors etc. | |
DDCRandom (unsigned int seed=0) | |
Constructor given state. More... | |
void | set_seed (unsigned int seed=0) |
set internal seed More... | |
~DDCRandom (void) | |
Default destructor. More... | |
API | |
double | random_d (void) |
returns a pseudo-random double in the range [0,1) More... | |
long | random_l (void) |
returns a pseudo-random long in the range [-2**31,2**31) More... | |
long | random_n (void) |
returns a pseudo-random unsigned long in the range [0,2**31) More... | |
Public Attributes | |
unsigned int | m_seed |
underlying random seed for POSIX.1 random numbers using rand_r() or srand()+rand() hack More... | |
unsigned short | m_state [3] |
underlying computation state (defaults to {m_seed,m_seed,m_seed}) for jrand48() & friends More... | |
thread-safe pseudo-random number stream using drand48() & friends
|
inline |
Constructor given state.
|
inline |
Default destructor.
|
inline |
set internal seed
Referenced by CConcSession::WorkerClone().
|
inline |
returns a pseudo-random double in the range [0,1)
|
inline |
returns a pseudo-random long in the range [-2**31,2**31)
Referenced by random_n().
|
inline |
returns a pseudo-random unsigned long in the range [0,2**31)
References random_l().
unsigned int DDCRandom::m_seed |
underlying random seed for POSIX.1 random numbers using rand_r() or srand()+rand() hack
unsigned short DDCRandom::m_state[3] |
underlying computation state (defaults to {m_seed,m_seed,m_seed}) for jrand48() & friends