#include <random.h>
◆ gen_int() [1/2]
| static int32_t liph::random::gen_int |
( |
int32_t |
a, |
|
|
int32_t |
b |
|
) |
| |
|
inlinestatic |
generate random int32_t range [a, b) if a >= b, return a
◆ gen_int() [2/2]
| static int32_t liph::random::gen_int |
( |
int32_t |
n | ) |
|
|
inlinestatic |
generate random int32_t range [0, n) if n <= 0, return 0
◆ gen_real()
| static double liph::random::gen_real |
( |
| ) |
|
|
inlinestatic |
generate double range [0, 1)
◆ gen_str()
| std::string liph::random::gen_str |
( |
size_t |
size, |
|
|
std::string_view |
charset = "0123456789" |
|
) |
| |
|
static |
generate random string of length size from charset
◆ next_bytes()
| bool liph::random::next_bytes |
( |
void * |
ptr, |
|
|
size_t |
n |
|
) |
| |
|
static |
◆ next_double()
| static double liph::random::next_double |
( |
| ) |
|
|
inlinestatic |
◆ next_float()
| static float liph::random::next_float |
( |
| ) |
|
|
inlinestatic |
◆ next_int32()
| static int32_t liph::random::next_int32 |
( |
| ) |
|
|
inlinestatic |
◆ next_int64()
| static int64_t liph::random::next_int64 |
( |
| ) |
|
|
inlinestatic |
◆ next_uint32()
| static uint32_t liph::random::next_uint32 |
( |
| ) |
|
|
inlinestatic |
◆ next_uint64()
| static uint64_t liph::random::next_uint64 |
( |
| ) |
|
|
inlinestatic |
The documentation for this struct was generated from the following files: