VIPRA Documentation
Loading...
Searching...
No Matches
VIPRA::Random::Engine Class Reference

Psuedo Random number engine. More...

#include <random.hpp>

Public Types

using result_type = uint64_t
 

Public Member Functions

 Engine (uint64_t seedVal)
 
auto operator() () noexcept -> uint64_t
 Produces the next pseudo random number in the sequence, uses Lehmer's generator.
 
void reseed (uint64_t seedNum) noexcept
 Restarts the number generator with a new seed.
 
 Engine (const Engine &)=default
 
 Engine (Engine &&) noexcept=default
 
auto operator= (const Engine &) -> Engine &=default
 
auto operator= (Engine &&) noexcept -> Engine &=default
 

Static Public Member Functions

static constexpr auto min () noexcept -> uint64_t
 Returns the minimum number possible.
 
static constexpr auto max () noexcept -> uint64_t
 Returns the maximum number possible.
 

Static Public Attributes

static constexpr uint64_t DEFAULT_SEED = 12345
 

Detailed Description

Psuedo Random number engine.

Member Function Documentation

◆ max()

static constexpr auto VIPRA::Random::Engine::max ( ) -> uint64_t
inlinestaticconstexprnoexcept

Returns the maximum number possible.

Returns
constexpr uint64_t

◆ min()

static constexpr auto VIPRA::Random::Engine::min ( ) -> uint64_t
inlinestaticconstexprnoexcept

Returns the minimum number possible.

Returns
constexpr uint64_t

◆ operator()()

auto VIPRA::Random::Engine::operator() ( ) -> uint64_t
inlinenoexcept

Produces the next pseudo random number in the sequence, uses Lehmer's generator.

Returns
uint64_t

◆ reseed()

void VIPRA::Random::Engine::reseed ( uint64_t seedNum)
inlinenoexcept

Restarts the number generator with a new seed.

Parameters
seedNum:

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