numerics
Loading...
Searching...
No Matches
num::Rng Struct Reference

Seeded pseudo-random number generator (Mersenne Twister). Pass a pointer to rng_* functions to draw samples. More...

#include <math.hpp>

Public Member Functions

 Rng (uint32_t seed)
 
 Rng ()
 Seed from hardware entropy.
 

Public Attributes

std::mt19937 engine
 

Detailed Description

Seeded pseudo-random number generator (Mersenne Twister). Pass a pointer to rng_* functions to draw samples.

Definition at line 274 of file math.hpp.

Constructor & Destructor Documentation

◆ Rng() [1/2]

num::Rng::Rng ( uint32_t  seed)
inlineexplicit

Definition at line 277 of file math.hpp.

◆ Rng() [2/2]

num::Rng::Rng ( )
inline

Seed from hardware entropy.

Definition at line 280 of file math.hpp.

Member Data Documentation

◆ engine

std::mt19937 num::Rng::engine

Definition at line 275 of file math.hpp.


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