tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
xorshift< UInt, X, Y, Z > Struct Template Reference

https://en.wikipedia.org/wiki/Xorshift More...

#include <xorshift.hpp>

Public Types

using result_type = UInt
 

Public Member Functions

constexpr xorshift ()=default
 
constexpr xorshift (result_type seed) noexcept
 
constexpr auto discard (unsigned long long z) noexcept -> void
 
constexpr auto operator() () noexcept -> result_type
 
constexpr auto seed (result_type value=default_seed) noexcept -> void
 

Static Public Member Functions

static constexpr auto max () noexcept -> result_type
 
static constexpr auto min () noexcept -> result_type
 

Static Public Attributes

static constexpr auto default_seed = result_type{5489U}
 

Friends

constexpr auto operator== (xorshift const &lhs, xorshift const &rhs) noexcept -> bool
 

Related Symbols

(Note that these are not member symbols.)

using xorshift16 = xorshift<uint16_t, 7, 9, 8>
 16-bit pseudo number generator
 
using xorshift32 = xorshift<uint32_t, 13, 17, 5>
 32-bit pseudo number generator
 
using xorshift64 = xorshift<uint64_t, 13, 7, 17>
 64-bit pseudo number generator
 

Detailed Description

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
struct etl::xorshift< UInt, X, Y, Z >

https://en.wikipedia.org/wiki/Xorshift

Note
Non-standard extension

Member Typedef Documentation

◆ result_type

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
using result_type = UInt

Constructor & Destructor Documentation

◆ xorshift() [1/2]

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
xorshift ( )
constexprdefault

◆ xorshift() [2/2]

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
xorshift ( result_type seed)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ discard()

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
auto discard ( unsigned long long z) -> void
inlineconstexprnoexcept

◆ max()

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
constexpr auto max ( ) -> result_type
inlinestaticnodiscardconstexprnoexcept

◆ min()

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
constexpr auto min ( ) -> result_type
inlinestaticnodiscardconstexprnoexcept

◆ operator()()

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
auto operator() ( ) -> result_type
inlinenodiscardconstexprnoexcept

◆ seed()

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
auto seed ( result_type value = default_seed) -> void
inlineconstexprnoexcept

Friends And Related Symbol Documentation

◆ operator==

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
auto operator== ( xorshift< UInt, X, Y, Z > const & lhs,
xorshift< UInt, X, Y, Z > const & rhs ) -> bool
friend

Member Data Documentation

◆ default_seed

template<unsigned_integral UInt, UInt X, UInt Y, UInt Z>
auto default_seed = result_type{5489U}
staticconstexpr

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