#include <random_generator.h>
Public Member Functions | |
int | generate (void) |
std::vector< uint8_t > | generate (int data_size) |
UniformRandomInteger (int lower_bound=0, int upper_bound=255) | |
Protected Attributes | |
boost::mt19937 | m_random_engine |
mersenne twister engine More... | |
boost::variate_generator< boost::mt19937 &, boost::uniform_int<> > | m_random_generator |
random number generator (glues mersenne engine and distribution) More... | |
boost::uniform_int | m_uniform_distribution |
uniform integer distribution More... | |
class UniformRandomInteger generates uniform distributed integer random numbers.
Definition at line 65 of file random_generator.h.
sick_scan::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 67 of file random_generator.cpp.
int sick_scan::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.
std::vector< uint8_t > sick_scan::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.
|
protected |
mersenne twister engine
Definition at line 95 of file random_generator.h.
|
protected |
random number generator (glues mersenne engine and distribution)
Definition at line 97 of file random_generator.h.
|
protected |
uniform integer distribution
Definition at line 96 of file random_generator.h.