EMANE  1.2.1
EMANE::Utils::RandomNumberDistribution< Generator, Distribution > Class Template Reference

A utility wrapper around a generator and a distribution. More...

#include <randomnumberdistribution.h>

Public Member Functions

 RandomNumberDistribution (typename Distribution::result_type min, typename Distribution::result_type max, unsigned seed=std::chrono::system_clock::now().time_since_epoch().count())
 
Distribution::result_type operator() ()
 

Detailed Description

template<class Generator, class Distribution>
class EMANE::Utils::RandomNumberDistribution< Generator, Distribution >

A utility wrapper around a generator and a distribution.

Definition at line 49 of file randomnumberdistribution.h.

Constructor & Destructor Documentation

◆ RandomNumberDistribution()

template<class Generator, class Distribution>
EMANE::Utils::RandomNumberDistribution< Generator, Distribution >::RandomNumberDistribution ( typename Distribution::result_type  min,
typename Distribution::result_type  max,
unsigned  seed = std::chrono::system_clock::now().time_since_epoch().count() 
)
inline

Creates a RandomNumberDistribution instance

Parameters
minMinimum value in distribution
maxMaximum value in distribution
seedGenerator seed

Definition at line 59 of file randomnumberdistribution.h.

Member Function Documentation

◆ operator()()

template<class Generator, class Distribution>
Distribution::result_type EMANE::Utils::RandomNumberDistribution< Generator, Distribution >::operator() ( )
inline

Generates a random number

Returns
random number

Definition at line 71 of file randomnumberdistribution.h.


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