Nori
|
Mersenne Twister: pseudorandom number generator based on a twisted generalized feedback shift register. More...
#include <random.h>
Public Member Functions | |
Random () | |
Create an uninitialized instance. | |
void | seed (uint32_t value) |
Seed the RNG with the specified seed value. | |
void | seed (uint32_t *values, int length) |
Seed the RNG with an entire array. | |
void | seed (Random *random) |
Seed the RNG using an existing instance. | |
uint32_t | nextUInt () |
Generate an uniformly distributed 32-bit integer. | |
float | nextFloat () |
Generate an uniformly distributed single precision value on [0,1) |
Mersenne Twister: pseudorandom number generator based on a twisted generalized feedback shift register.
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved.
Random::Random | ( | ) |
Create an uninitialized instance.
float Random::nextFloat | ( | ) |
Generate an uniformly distributed single precision value on [0,1)
uint32_t Random::nextUInt | ( | ) |
Generate an uniformly distributed 32-bit integer.
void Random::seed | ( | uint32_t * | values, |
int | length | ||
) |
Seed the RNG with an entire array.
void Random::seed | ( | Random * | random | ) |
Seed the RNG using an existing instance.
void Random::seed | ( | uint32_t | value | ) |
Seed the RNG with the specified seed value.