11 #ifndef INCLUDED_GR_RANDOM_H
12 #define INCLUDED_GR_RANDOM_H
44 static constexpr
result_type max() {
return std::numeric_limits<result_type>::max(); }
74 std::uniform_real_distribution<float>
79 random(uint64_t seed = 0, int64_t min_integer = 0, int64_t max_integer = 2);
86 void reseed(uint64_t seed);
93 void set_integer_limits(int64_t minimum, int64_t maximum);
127 float impulse(
float factor);
std::uniform_real_distribution< float > d_uniform
Definition: random.h:75
static constexpr result_type min()
minimum value
Definition: random.h:40
wrapper for XOROSHIRO128+ PRNG for use in std::distributions Fulfills C++ named requirements for Unif...
Definition: random.h:28
float min(float a, float b)
float d_gauss_value
Definition: random.h:71
static void xoroshiro128p_seed(uint64_t *state, const uint64_t seed)
Seed the 128 bit state from a 64 bit seed.
Definition: xoroshiro128p.h:91
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
static constexpr result_type max()
maximum value
Definition: random.h:44
std::complex< float > gr_complex
Definition: gr_complex.h:15
static uint64_t xoroshiro128p_next(uint64_t *state)
generate the next random number and update the state. This is the workhorse, here! ...
Definition: xoroshiro128p.h:39
uint64_t result_type
Definition: random.h:31
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::uniform_int_distribution< int64_t > d_integer_dis
Definition: random.h:76
long d_seed
Definition: random.h:69
xoroshiro128p_prng(uint64_t init)
constructor. Expects a seed.
Definition: random.h:49
bool d_gauss_stored
Definition: random.h:70
void seed(uint64_t seed)
set new seed
Definition: random.h:60
result_type operator()()
yield a random value and advance state
Definition: random.h:55
xoroshiro128p_prng d_rng
Definition: random.h:73
pseudo random number generator
Definition: random.h:66