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>
96 ukey_type x = {{
typename ukey_type::value_type(r)}};
113 v.back() = e.
v.back();
117 v.back() = e.
v.back();
120#if __cplusplus >= 201103L
125 template<
typename SeedSeq>
129 typename std::enable_if<!std::is_convertible<SeedSeq, result_type>::value>::type* = 0
140 template<
typename SeedSeq>
144 typename std::enable_if<!std::is_convertible<SeedSeq, result_type>::value>::type* = 0
153 return lhs.
c == rhs.
c && lhs.
v.back() == rhs.
v.back() && lhs.
key == rhs.
key;
156 return lhs.
c != rhs.
c || lhs.
v.back() != rhs.
v.back() || lhs.
key != rhs.
key;
160 return os << be.
c <<
" " << be.
key <<
" " << be.
v.back();
164 is >> be.
c >> be.
key >> be.
v.back();
192 return b(
c.incr(),
key)[0];
205 size_t nelem =
c.size();
206 size_t sub = skip % nelem;
237#if R123_USE_CXX11_TYPE_TRAITS
238 template<
typename DUMMY =
void>
239 explicit Engine(
key_type const& k,
typename std::enable_if<!std::is_same<ukey_type, key_type>::value, DUMMY>::type* = 0)
244 template<
typename DUMMY =
void>
245 void seed(
key_type const& k,
typename std::enable_if<!std::is_same<ukey_type, key_type>::value, DUMMY>::type* = 0) {
272 return std::make_pair(
c,
v.back());
277 static const size_t nelem =
c.size();
279 throw std::range_error(
"Engine::setcounter called with elem out of range");
285 void setcounter(std::pair<ctr_type, result_type>
const& ce) {
#define R123_USE_CXX11_TYPE_TRAITS
static R123_CONSTEXPR result_type max R123_NO_MACRO_SUBST()
friend std::ostream & operator<<(std::ostream &os, Engine const &be)
void setcounter(std::pair< ctr_type, result_type > const &ce)
friend bool operator==(Engine const &lhs, Engine const &rhs)
void seed(ukey_type const &uk)
void discard(R123_ULONG_LONG skip)
CBRNG::ukey_type ukey_type
ctr_type::value_type result_type
friend std::istream & operator>>(std::istream &is, Engine &be)
Engine(ukey_type const &uk)
friend bool operator!=(Engine const &lhs, Engine const &rhs)
ctr_type operator()(ctr_type const &c) const
std::pair< ctr_type, result_type > getcounter() const
static const result_type _Min
void setkey(key_type const &k)
static const result_type _Max
static R123_CONSTEXPR result_type min R123_NO_MACRO_SUBST()
void setcounter(ctr_type const &_c, result_type _elem)