header_utils
Loading...
Searching...
No Matches
ghassanpl::random::good_random_engine Struct Reference

A good quality random engine that meets the standard library concept of a random bit generator. More...

#include <random.h>

Public Member Functions

 good_random_engine (uint64_t j) noexcept
void seed (uint64_t j) noexcept
uint64_t operator() () noexcept

Static Public Member Functions

static constexpr uint64_t max () noexcept
static constexpr uint64_t min () noexcept

Public Attributes

uint64_t u
uint64_t v
uint64_t w

Detailed Description

A good quality random engine that meets the standard library concept of a random bit generator.

Shamelessly stolen from 'Numeric Recipes: The Art of Scientific Computing' Third Edition, by William H. Press et. al, Cambridge University Press, 2007 (ISBN 978-0521880688),

Definition at line 24 of file random.h.

Constructor & Destructor Documentation

◆ good_random_engine()

ghassanpl::random::good_random_engine::good_random_engine ( uint64_t j)
inlinenoexcept

Definition at line 27 of file random.h.

Member Function Documentation

◆ max()

constexpr uint64_t ghassanpl::random::good_random_engine::max ( )
inlinestaticnodiscardconstexprnoexcept

Definition at line 40 of file random.h.

◆ min()

constexpr uint64_t ghassanpl::random::good_random_engine::min ( )
inlinestaticnodiscardconstexprnoexcept

Definition at line 41 of file random.h.

◆ operator()()

uint64_t ghassanpl::random::good_random_engine::operator() ( )
inlinenodiscardnoexcept

Definition at line 43 of file random.h.

◆ seed()

void ghassanpl::random::good_random_engine::seed ( uint64_t j)
inlinenoexcept

Definition at line 31 of file random.h.

Member Data Documentation

◆ u

uint64_t ghassanpl::random::good_random_engine::u

Definition at line 26 of file random.h.

◆ v

uint64_t ghassanpl::random::good_random_engine::v

Definition at line 26 of file random.h.

◆ w

uint64_t ghassanpl::random::good_random_engine::w

Definition at line 26 of file random.h.