Public Member Functions | Protected Attributes | List of all members
sick_scan::UniformRandomInteger Class Reference

#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...
 

Detailed Description

class UniformRandomInteger generates uniform distributed integer random numbers.

Definition at line 65 of file random_generator.h.

Constructor & Destructor Documentation

sick_scan::UniformRandomInteger::UniformRandomInteger ( int  lower_bound = 0,
int  upper_bound = 255 
)

UniformRandomInteger constructor

Parameters
[in]lower_boundmin. 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_boundmax. 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

Parameters
[in]lower_boundmin. value of random distribution, random numbers will be generated within the range lower_bound up to upper_bound
[in]upper_boundmax. 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.

Member Function Documentation

int sick_scan::UniformRandomInteger::generate ( void  )

Returns a uniform distributed integer random number within the range lower_bound up to upper_bound

Returns
uniform distributed random number

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

Parameters
[in]data_sizenumber of random bytes created, size of output data
Returns
binary random data of length data_size

Definition at line 85 of file random_generator.cpp.

Member Data Documentation

boost::mt19937 sick_scan::UniformRandomInteger::m_random_engine
protected

mersenne twister engine

Definition at line 95 of file random_generator.h.

boost::variate_generator<boost::mt19937&, boost::uniform_int<> > sick_scan::UniformRandomInteger::m_random_generator
protected

random number generator (glues mersenne engine and distribution)

Definition at line 97 of file random_generator.h.

boost::uniform_int sick_scan::UniformRandomInteger::m_uniform_distribution
protected

uniform integer distribution

Definition at line 96 of file random_generator.h.


The documentation for this class was generated from the following files:


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Wed May 5 2021 03:05:49