|
liba 0.1.15
An algorithm library based on C/C++
|
pseudorandom number generator More...
#include "a.h"Go to the source code of this file.
Data Structures | |
| struct | a_rand_lcg48 |
| instance structure for the linear congruential generator and 48-bit integer arithmetic More... | |
| struct | a_rand_pcg32 |
| instance structure for the permuted congruential generator and 64-bit integer arithmetic More... | |
Typedefs | |
| typedef struct a_rand_lcg48 | a_rand_lcg48 |
| typedef struct a_rand_pcg32 | a_rand_pcg32 |
| typedef struct a_rand_lcg48 | a::rand_lcg48 |
| typedef struct a_rand_pcg32 | a::rand_pcg32 |
Functions | |
| void | a_rand_lcg48_init (a_rand_lcg48 *ctx, a_i64 x) |
| initialize with a seed value for the linear congruential generator and 48-bit integer arithmetic. | |
| void | a_rand_lcg48_seed (a_rand_lcg48 *ctx, a_u16 const x[3]) |
| initialize with a specific state for the linear congruential generator and 48-bit integer arithmetic. | |
| a_u64 | a_rand_lcg48_next (a_rand_lcg48 *ctx, a_u16 x[3]) |
| perform one iteration for the linear congruential generator and 48-bit integer arithmetic. | |
| a_i32 | a_rand_lcg48i (a_rand_lcg48 *ctx) |
| generate a signed 32-bit random integer. | |
| a_i32 | a_rand_lcg48i_ (a_rand_lcg48 *ctx, a_u16 x[3]) |
| generate a signed 32-bit random integer. | |
| a_u32 | a_rand_lcg48u (a_rand_lcg48 *ctx) |
| generate an unsigned 32-bit random integer. | |
| a_u32 | a_rand_lcg48u_ (a_rand_lcg48 *ctx, a_u16 x[3]) |
| generate an unsigned 32-bit random integer. | |
| a_f64 | a_rand_lcg48f (a_rand_lcg48 *ctx) |
| generate a 64-bit floating-point random number in [0,1). | |
| a_f64 | a_rand_lcg48f_ (a_rand_lcg48 *ctx, a_u16 x[3]) |
| generate a 64-bit floating-point random number in [0,1). | |
| void | a_rand_lcg48_shuf (a_rand_lcg48 *ctx, void *ptr, a_size num, a_size siz) |
| shuffle the elements of an array in place using the Fisher-Yates (Knuth) shuffle algorithm. | |
| void | a_rand_pcg32_init (a_rand_pcg32 *ctx, a_u64 x, a_u64 c) |
| initialize with initial value for the permuted congruential generator and 64-bit integer arithmetic. | |
| a_u32 | a_rand_pcg32u (a_rand_pcg32 *ctx) |
| generate an unsigned 32-bit random integer. | |
| a_u32 | a_rand_pcg32n (a_rand_pcg32 *ctx, a_u32 n) |
| generate an unsigned 32-bit random integer in [0,n). | |
| a_f64 | a_rand_pcg32f (a_rand_pcg32 *ctx) |
| generate a 64-bit floating-point random number in [0,1). | |
| void | a_rand_pcg32_shuf (a_rand_pcg32 *ctx, void *ptr, a_size num, a_size siz) |
| shuffle the elements of an array in place using the Fisher-Yates (Knuth) shuffle algorithm. | |
pseudorandom number generator