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);
pseudo random number generator
Definition: random.h:67
float rayleigh()
Rayleigh distributed random numbers (zero mean and variance 1 for the underlying Gaussian distributio...
float impulse(float factor)
Exponentially distributed random numbers with values less than or equal to factor replaced with zero....
float ran1()
Uniform random numbers in the range [0.0, 1.0)
void set_integer_limits(int64_t minimum, int64_t maximum)
gr_complex rayleigh_complex()
Normally distributed random numbers with zero mean and variance 1 on real and imaginary part....
float laplacian()
Laplacian distributed random numbers with zero mean and variance 1.
long d_seed
Definition: random.h:69
std::uniform_real_distribution< float > d_uniform
Definition: random.h:75
void reseed(uint64_t seed)
Change the seed for the initialized number generator. seed = 0 initializes the random number generato...
xoroshiro128p_prng d_rng
Definition: random.h:73
float d_gauss_value
Definition: random.h:71
bool d_gauss_stored
Definition: random.h:70
random(uint64_t seed=0, int64_t min_integer=0, int64_t max_integer=2)
std::uniform_int_distribution< int64_t > d_integer_dis
Definition: random.h:76
float gasdev()
Normally distributed random numbers (Gaussian distribution with zero mean and variance 1)
wrapper for XOROSHIRO128+ PRNG for use in std::distributions Fulfills C++ named requirements for Unif...
Definition: random.h:29
void seed(uint64_t seed)
set new seed
Definition: random.h:60
xoroshiro128p_prng(uint64_t init)
constructor. Expects a seed.
Definition: random.h:49
static constexpr result_type min()
minimum value
Definition: random.h:40
static constexpr result_type max()
maximum value
Definition: random.h:44
uint64_t result_type
Definition: random.h:31
result_type operator()()
yield a random value and advance state
Definition: random.h:55
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
std::complex< float > gr_complex
Definition: gr_complex.h:15
float min(float a, float b)
GNU Radio logging wrapper.
Definition: basic_block.h:29
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
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