32#ifndef __Engine_dot_hpp_
33#define __Engine_dot_hpp_
35#include "../features/compilerfeatures.h"
42#if R123_USE_CXX11_TYPE_TRAITS
67template<
typename CBRNG>
95 ukey_type x = {{
typename ukey_type::value_type(
r)}};
112 v.back() =
e.v.back();
116 v.back() =
e.v.back();
119#if __cplusplus >= 201103L
124 template <
typename SeedSeq>
127 ,
typename std::enable_if<!std::is_convertible<SeedSeq, result_type>::value>
::type* =0
138 template <
typename SeedSeq>
141 ,
typename std::enable_if<!std::is_convertible<SeedSeq, result_type>::value>
::type* =0
157 return os <<
be.c <<
" " <<
be.key <<
" " <<
be.v.back();
161 is >>
be.c >>
be.key >>
be.v.back();
185 return b(
c.incr(),
key)[0];
226#if R123_USE_CXX11_TYPE_TRAITS
227 template <
typename DUMMY=
void>
229 typename std::enable_if<!std::is_same<ukey_type, key_type>::value,
DUMMY>
::type* = 0)
230 :
key(k),
c(){
v.back() = 0; }
232 template <
typename DUMMY=
void>
234 typename std::enable_if<!std::is_same<ukey_type, key_type>::value,
DUMMY>
::type* = 0){
261 return std::make_pair(
c,
v.back());
266 static const size_t nelem =
c.size();
268 throw std::range_error(
"Engine::setcounter called with elem out of range");
static R123_CONSTEXPR result_type max R123_NO_MACRO_SUBST()
Definition Engine.hpp:181
CBRNG::key_type key_type
Definition Engine.hpp:71
void discard(R123_ULONG_LONG skip)
Definition Engine.hpp:196
CBRNG::ukey_type ukey_type
Definition Engine.hpp:72
Engine(Engine &e)
Definition Engine.hpp:111
ctr_type::value_type result_type
Definition Engine.hpp:73
friend std::ostream & operator<<(std::ostream &os, const Engine &be)
Definition Engine.hpp:156
CBRNG cbrng_type
Definition Engine.hpp:69
Engine(const Engine &e)
Definition Engine.hpp:115
friend std::istream & operator>>(std::istream &is, Engine &be)
Definition Engine.hpp:160
ctr_type operator()(const ctr_type &c) const
Definition Engine.hpp:241
void seed(const ukey_type &uk)
Definition Engine.hpp:219
cbrng_type b
Definition Engine.hpp:76
friend bool operator==(const Engine &lhs, const Engine &rhs)
Definition Engine.hpp:149
ctr_type v
Definition Engine.hpp:79
void seed(ukey_type &uk)
Definition Engine.hpp:222
key_type getkey() const
Definition Engine.hpp:245
std::pair< ctr_type, result_type > getcounter() const
Definition Engine.hpp:260
void seed(result_type r)
Definition Engine.hpp:135
CBRNG::ctr_type ctr_type
Definition Engine.hpp:70
static const result_type _Min
Definition Engine.hpp:177
void fix_invariant()
Definition Engine.hpp:81
void seed(SeedSeq &s)
Definition Engine.hpp:139
Engine(const ukey_type &uk)
Definition Engine.hpp:217
void setcounter(const std::pair< ctr_type, result_type > &ce)
Definition Engine.hpp:274
Engine(SeedSeq &s)
Definition Engine.hpp:125
Engine()
Definition Engine.hpp:89
result_type operator()()
Definition Engine.hpp:183
void setkey(const key_type &k)
Definition Engine.hpp:252
key_type key
Definition Engine.hpp:77
Engine(result_type r)
Definition Engine.hpp:94
static const result_type _Max
Definition Engine.hpp:178
Engine(ukey_type &uk)
Definition Engine.hpp:218
void setcounter(const ctr_type &_c, result_type _elem)
Definition Engine.hpp:265
friend bool operator!=(const Engine &lhs, const Engine &rhs)
Definition Engine.hpp:152
static R123_CONSTEXPR result_type min R123_NO_MACRO_SUBST()
Definition Engine.hpp:180
ctr_type c
Definition Engine.hpp:78
void seed()
Definition Engine.hpp:146