Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
RandInt Class Reference

Produce random integer (int) values. More...

#include <RandInt.h>

Collaboration diagram for RandInt:
Collaboration graph

Public Member Functions

 RandInt (unsigned int a, unsigned int b)
 Initialize seed and ranfe of generator. More...
 
int operator() ()
 return random int within range. More...
 

Private Attributes

std::mt19937 m_mt
 
std::uniform_int_distribution
< int > 
m_dist
 

Detailed Description

Produce random integer (int) values.

Definition at line 27 of file RandInt.h.

Constructor & Destructor Documentation

RandInt::RandInt ( unsigned int  a,
unsigned int  b 
)
inline

Initialize seed and ranfe of generator.

Definition at line 31 of file RandInt.h.

Member Function Documentation

int RandInt::operator() ( )
inline

return random int within range.

Definition at line 35 of file RandInt.h.

References m_dist, and m_mt.

Member Data Documentation

std::mt19937 RandInt::m_mt
private

Definition at line 38 of file RandInt.h.

Referenced by operator()().

std::uniform_int_distribution<int> RandInt::m_dist
private

Definition at line 39 of file RandInt.h.

Referenced by operator()().


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