tinymt-cpp  0.0.1
Classes | Namespaces | Macros | Typedefs | Functions | Variables
tinymt.h File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <istream>
#include <limits>
#include <ostream>
#include <type_traits>
Include dependency graph for tinymt.h:

Go to the source code of this file.

Classes

struct  tinymt::detail::is_twos_complement< T >
 Checks whether the given integral type T (or its signed type) uses 2's complement for the signed integer representation. More...
 
struct  tinymt::detail::tinymt_engine_param< UIntType >
 Generator's parameter set. More...
 
struct  tinymt::detail::tinymt_engine_status< UIntType, WordSize, Mat1, Mat2, TMat >
 Generator's state and parameter set. More...
 
struct  tinymt::detail::tinymt_engine_status< UIntType, 32, Mat1, Mat2, TMat >
 
struct  tinymt::detail::tinymt_engine_status< UIntType, 32, Mat1, Mat2, TMat >::is_dynamic
 
struct  tinymt::detail::tinymt_engine_status< UIntType, 32, 0, 0, 0 >
 
struct  tinymt::detail::tinymt_engine_status< UIntType, 32, 0, 0, 0 >::is_dynamic
 
struct  tinymt::detail::tinymt_engine_impl< UIntType, WordSize, Mat1, Mat2, TMat, DoPeriodCertification >
 Core implementation of the TinyMT algorithms. More...
 
struct  tinymt::detail::tinymt_engine_impl< UIntType, 32, Mat1, Mat2, TMat, DoPeriodCertification >
 
class  tinymt::tinymt_engine< UIntType, WordSize, Mat1, Mat2, TMat, DoPeriodCertification >
 Pseudo-random number generator engine based on the TinyMT algorithms. More...
 

Namespaces

 tinymt
 Namespace for classes that implement the TinyMT algorithms.
 
 tinymt::detail
 Internal details.
 

Macros

#define TINYMT_CPP_ENABLE_WHEN(...)
 Macro to enable/disable function via SFINAE. More...
 

Typedefs

using tinymt::tinymt32 = tinymt_engine< uint_fast32_t, 32, detail::tinymt32_default_param_mat1, detail::tinymt32_default_param_mat2, detail::tinymt32_default_param_tmat, false >
 TinyMT32 generator engine with the parameter set specified in RFC 8682. More...
 
using tinymt::tinymt32_dc = tinymt_engine< uint_fast32_t, 32, 0, 0, 0, true >
 TinyMT32 generator engine with "Dynamic Creation" of its parameter set. More...
 

Functions

template<class UIntType1 , class UIntType2 , std::size_t WordSize, std::uintmax_t Mat11, std::uintmax_t Mat12, std::uintmax_t Mat21, std::uintmax_t Mat22, std::uintmax_t TMat1, std::uintmax_t TMat2>
bool tinymt::detail::operator== (const tinymt_engine_status< UIntType1, WordSize, Mat11, Mat21, TMat1 > &a, const tinymt_engine_status< UIntType2, WordSize, Mat12, Mat22, TMat2 > &b)
 
template<class UIntType1 , class UIntType2 , std::size_t WordSize, std::uintmax_t Mat11, std::uintmax_t Mat12, std::uintmax_t Mat21, std::uintmax_t Mat22, std::uintmax_t TMat1, std::uintmax_t TMat2>
bool tinymt::detail::operator!= (const tinymt_engine_status< UIntType1, WordSize, Mat11, Mat21, TMat1 > &a, const tinymt_engine_status< UIntType2, WordSize, Mat12, Mat22, TMat2 > &b)
 
template<class CharT , class Traits , class UIntType , std::size_t WordSize, std::uintmax_t Mat1, std::uintmax_t Mat2, std::uintmax_t TMat>
std::basic_ostream< CharT, Traits > & tinymt::detail::operator<< (std::basic_ostream< CharT, Traits > &os, const tinymt_engine_status< UIntType, WordSize, Mat1, Mat2, TMat > &s)
 
template<class CharT , class Traits , class UIntType , std::size_t WordSize, std::uintmax_t Mat1, std::uintmax_t Mat2, std::uintmax_t TMat, TINYMT_CPP_ENABLE_WHEN(!tinymt_engine_status< UIntType, WordSize, Mat1, Mat2, TMat >::is_dynamic::value) >
std::basic_istream< CharT, Traits > & tinymt::detail::operator>> (std::basic_istream< CharT, Traits > &is, tinymt_engine_status< UIntType, WordSize, Mat1, Mat2, TMat > &s)
 

Variables

constexpr uint_least32_t tinymt::detail::tinymt32_default_param_mat1 = 0x8f7011eeU
 Default parameter mat1 of TinyMT32 specified in RFC 8682. More...
 
constexpr uint_least32_t tinymt::detail::tinymt32_default_param_mat2 = 0xfc78ff1fU
 Default parameter mat2 of TinyMT32 specified in RFC 8682. More...
 
constexpr uint_least32_t tinymt::detail::tinymt32_default_param_tmat = 0x3793fdffU
 Default parameter tmat of TinyMT32 specified in RFC 8682. More...
 

Macro Definition Documentation

◆ TINYMT_CPP_ENABLE_WHEN

#define TINYMT_CPP_ENABLE_WHEN (   ...)
Value:
typename TINYMT_CPP_ENABLE_WHEN_T_ = std::nullptr_t, \
typename std::enable_if < std::is_same<TINYMT_CPP_ENABLE_WHEN_T_, \
std::nullptr_t>::value && \
(__VA_ARGS__), \
std::nullptr_t > ::type = nullptr

Macro to enable/disable function via SFINAE.

Parameters
...condition to enable the function