Definitions for random number generations. More...
Go to the source code of this file.
Classes | |
class | sqlstat::MersenneTwister |
Mersenne Twister random number generator. More... | |
Macros | |
#define | MT_LEN 624 |
length of buffer | |
#define | MT_IA 397 |
offset in buffer | |
#define | MT_IB (MT_LEN - MT_IA) |
length - offset in buffer | |
#define | UPPER_MASK 0x80000000 |
mask for bit 31 | |
#define | LOWER_MASK 0x7FFFFFFF |
mask for low bits | |
#define | MATRIX_A 0x9908B0DF |
mask for distributing bit 0 | |
#define | TWIST(b, i, j) ((b)[i] & UPPER_MASK) | ((b)[j] & LOWER_MASK) |
merge bit 31 of one parameter with the low bits of the other parameter. | |
#define | MAGIC(s) (((s)&1)*MATRIX_A) |
distribute the low bit | |
Definitions for random number generations.
Definition in file sqlrand.h.