Random number generator - Definition. More...
Go to the source code of this file.
Defines | |
#define | LOWER_MASK VL_UINT32_C(0x7fffffff) /* least significant r bits */ |
#define | M 397 |
#define | MATRIX_A VL_UINT32_C(0x9908b0df) /* constant vector a */ |
#define | mt self->mt |
#define | mt self->mt |
#define | mt self->mt |
#define | mti self->mti |
#define | mti self->mti |
#define | mti self->mti |
#define | N 624 |
#define | UPPER_MASK VL_UINT32_C(0x80000000) /* most asignificant w-r bits */ |
Functions | |
void | vl_rand_init (VlRand *self) |
Initialise random number generator. | |
void | vl_rand_permute_indexes (VlRand *self, vl_index *array, vl_size size) |
Randomly permute and array of indexes. | |
void | vl_rand_seed (VlRand *self, vl_uint32 s) |
Seed the state of the random number generator. | |
void | vl_rand_seed_by_array (VlRand *self, vl_uint32 const key[], vl_size keySize) |
Seed the state of the random number generator by an array. | |
vl_uint32 | vl_rand_uint32 (VlRand *self) |
Generate a random UINT32. |
Random number generator - Definition.
Definition in file random.c.
#define LOWER_MASK VL_UINT32_C(0x7fffffff) /* least significant r bits */ |
#define MATRIX_A VL_UINT32_C(0x9908b0df) /* constant vector a */ |
#define UPPER_MASK VL_UINT32_C(0x80000000) /* most asignificant w-r bits */ |
void vl_rand_init | ( | VlRand * | self | ) |
void vl_rand_permute_indexes | ( | VlRand * | self, |
vl_index * | array, | ||
vl_size | size | ||
) |
void vl_rand_seed | ( | VlRand * | self, |
vl_uint32 | s | ||
) |
void vl_rand_seed_by_array | ( | VlRand * | self, |
vl_uint32 const | key[], | ||
vl_size | keySize | ||
) |
vl_uint32 vl_rand_uint32 | ( | VlRand * | self | ) |