36#if !defined(LIBCOYOTL_PRNG_H)
37#define LIBCOYOTL_PRNG_H
A STL-compatible array class.
Definition array.h:73
An abstract definition of a peudorandom number generator.
Definition prng.h:55
double get_rand_real3()
Get the next number in the range (0,1)
Definition prng.h:198
prng()
Default constructor, reading seed from/dev/urandom or the time.
double get_rand_real2()
Get the next number in the range [0,1)
Definition prng.h:189
uint32_t get_seed()
Returns the original seed value.
Definition prng.h:154
virtual uint32_t get_rand()=0
Get the next integer.
uint32_t m_seed
Initialization seed.
Definition prng.h:58
uint32_t get_rand_range(uint32_t lo, uint32_t hi)
Get the next integer in the range [lo,hi].
Definition prng.h:161
virtual void init(uint32_t seed)
Initializes the generator with "seed".
double get_rand_real1()
Get the next number in the range [0,1].
Definition prng.h:180
size_t get_rand_index(size_t length)
Get the next random value as a size_t index.
Definition prng.h:172
prng(uint32_t seed)
Default constructor, with optional seed.
double get_rand_real53()
Get the next number in the range [0,1)