RandLib 2.0.0
Probability distributions, fitting, and heavy-tail tools for C++20
Loading...
Searching...
No Matches
randlib::detail::EngineRef Class Reference

The EngineRef class
Non-owning, type-erased reference to any uniform random bit generator. More...

#include <uniform.hpp>

Public Types

using result_type = std::uint64_t
 

Public Member Functions

template<std::uniform_random_bit_generator G>
requires (!std::same_as<std::remove_cv_t<G>, EngineRef>)
 EngineRef (G &engine) noexcept
 
result_type operator() ()
 

Static Public Member Functions

static constexpr result_type min () noexcept
 
static constexpr result_type max () noexcept
 

Detailed Description

The EngineRef class
Non-owning, type-erased reference to any uniform random bit generator.

Each call returns 64 random bits of the referenced engine, so the virtual sampling interface of the distribution classes can accept engines of every type. Engines with 64-bit output are consumed exactly as by direct calls.

Member Typedef Documentation

◆ result_type

Constructor & Destructor Documentation

◆ EngineRef()

template<std::uniform_random_bit_generator G>
requires (!std::same_as<std::remove_cv_t<G>, EngineRef>)
randlib::detail::EngineRef::EngineRef ( G &  engine)
inlinenoexcept

Member Function Documentation

◆ max()

static constexpr result_type randlib::detail::EngineRef::max ( )
inlinestaticconstexprnoexcept

◆ min()

static constexpr result_type randlib::detail::EngineRef::min ( )
inlinestaticconstexprnoexcept

◆ operator()()

result_type randlib::detail::EngineRef::operator() ( )
inline

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