allpix::RandomNumberGenerator

Wrapper around the STL’s Mersenne Twister.

#include <prng.h>

Inherits from std::mt19937_64

Public Functions

Name
RandomNumberGenerator & operator=(const RandomNumberGenerator & ) =delete
Disallow copy-assignment.
RandomNumberGenerator & operator=(RandomNumberGenerator && ) =delete
Disallow move assignment.
std::uint_fast64_t operator()()

Public Functions Documentation

function operator=

RandomNumberGenerator & operator=(
    const RandomNumberGenerator & 
) =delete

Disallow copy-assignment.

function operator=

RandomNumberGenerator & operator=(
    RandomNumberGenerator && 
) =delete

Disallow move assignment.

function operator()

inline std::uint_fast64_t operator()()

Return: 64-bit pseudo-random number

Redefine function operator to retrieve pseudo-random numbers. This allows us to log the number at retrieval. Technically we are shadowing the base class operator since it is non-virtual and explicitly call it from within.


Updated on 2025-02-27 at 14:14:46 +0000