#include <random_generator.h>
Public Member Functions | |
std::vector< uint8_t > | generate (int data_size) |
int | generate (void) |
UniformRandomInteger (int lower_bound=0, int upper_bound=255) | |
Protected Attributes | |
int | m_lower_bound |
std::random_device | m_random_device |
random device More... | |
std::mt19937 | m_random_engine |
mersenne twister engine More... | |
std::uniform_int_distribution< int > | m_uniform_distribution |
uniform integer distribution More... | |
int | m_upper_bound |
class UniformRandomInteger generates uniform distributed integer random numbers.
Definition at line 67 of file random_generator.h.
sick_scan_xd::UniformRandomInteger::UniformRandomInteger | ( | int | lower_bound = 0 , |
int | upper_bound = 255 |
||
) |
UniformRandomInteger constructor
[in] | lower_bound | min. value of random distribution, random numbers will be generated within the range lower_bound up to upper_bound,(lower and upper bound included) |
[in] | upper_bound | max. value of random distribution, random numbers will be generated within the range lower_bound up to upper_bound (lower and upper bound included) |
UniformRandomInteger constructor
[in] | lower_bound | min. value of random distribution, random numbers will be generated within the range lower_bound up to upper_bound |
[in] | upper_bound | max. value of random distribution, random numbers will be generated within the range lower_bound up to upper_bound |
Definition at line 66 of file random_generator.cpp.
std::vector< uint8_t > sick_scan_xd::UniformRandomInteger::generate | ( | int | data_size | ) |
Creates and returns uniform distributed binary random data of a given size
[in] | data_size | number of random bytes created, size of output data |
Definition at line 85 of file random_generator.cpp.
int sick_scan_xd::UniformRandomInteger::generate | ( | void | ) |
Returns a uniform distributed integer random number within the range lower_bound up to upper_bound
Returns a uniform distributed integer random number within the range lower_bound up to upper_bound
Definition at line 75 of file random_generator.cpp.
|
protected |
Definition at line 97 of file random_generator.h.
|
protected |
random device
Definition at line 99 of file random_generator.h.
|
protected |
mersenne twister engine
Definition at line 100 of file random_generator.h.
|
protected |
uniform integer distribution
Definition at line 101 of file random_generator.h.
|
protected |
Definition at line 98 of file random_generator.h.