Public Member Functions | List of all members
RandomNumberGenerator< T, D > Class Template Referencefinal

The random number generator implementation class. More...

#include <Random.hpp>

Public Member Functions

 RandomNumberGenerator (T lower, T upper)
 Create a randomly seeded random number generator with a range of [lower, upper]. More...
 
 RandomNumberGenerator (T lower, T upper, unsigned int seed)
 Create an explicitly seeded random number generator with a range of [lower, upper]. More...
 
operator() ()
 Get the next random number. More...
 

Detailed Description

template<typename T, typename D>
class Balau::Util::RandomNumberGenerator< T, D >

The random number generator implementation class.

Typedefs are defined for different primitive types.

The Mersenne Twister generator is used internally.

Constructor & Destructor Documentation

◆ RandomNumberGenerator() [1/2]

RandomNumberGenerator ( lower,
upper 
)
inline

Create a randomly seeded random number generator with a range of [lower, upper].

◆ RandomNumberGenerator() [2/2]

RandomNumberGenerator ( lower,
upper,
unsigned int  seed 
)
inline

Create an explicitly seeded random number generator with a range of [lower, upper].

Member Function Documentation

◆ operator()()

T operator() ( )
inline

Get the next random number.


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