Project Alice
|
#include <Engine.hpp>
Public Types | |
typedef CBRNG | cbrng_type |
typedef CBRNG::ctr_type | ctr_type |
typedef CBRNG::key_type | key_type |
typedef CBRNG::ukey_type | ukey_type |
typedef ctr_type::value_type | result_type |
Public Member Functions | |
Engine () | |
Engine (result_type r) | |
Engine (Engine &e) | |
Engine (Engine const &e) | |
template<typename SeedSeq > | |
Engine (SeedSeq &s) | |
void | seed (result_type r) |
template<typename SeedSeq > | |
void | seed (SeedSeq &s) |
void | seed () |
result_type | operator() () |
void | discard (R123_ULONG_LONG skip) |
Engine (ukey_type const &uk) | |
Engine (ukey_type &uk) | |
void | seed (ukey_type const &uk) |
void | seed (ukey_type &uk) |
ctr_type | operator() (ctr_type const &c) const |
key_type | getkey () const |
void | setkey (key_type const &k) |
std::pair< ctr_type, result_type > | getcounter () const |
void | setcounter (ctr_type const &_c, result_type _elem) |
void | setcounter (std::pair< ctr_type, result_type > const &ce) |
Static Public Member Functions | |
static R123_CONSTEXPR result_type min | R123_NO_MACRO_SUBST () |
static R123_CONSTEXPR result_type max | R123_NO_MACRO_SUBST () |
Static Public Attributes | |
static const result_type | _Min = 0 |
static const result_type | _Max = ~((result_type)0) |
Protected Member Functions | |
void | fix_invariant () |
Protected Attributes | |
cbrng_type | b |
key_type | key |
ctr_type | c |
ctr_type | v |
Friends | |
bool | operator== (Engine const &lhs, Engine const &rhs) |
bool | operator!= (Engine const &lhs, Engine const &rhs) |
std::ostream & | operator<< (std::ostream &os, Engine const &be) |
std::istream & | operator>> (std::istream &is, Engine &be) |
If G satisfies the requirements of a CBRNG, and has a ctr_type whose value_type is an unsigned integral type, then Engine<G> satisfies the requirements of a C++11 "Uniform Random Number Engine" and can be used in any context where such an object is expected.
Note that wrapping a counter based RNG with a traditional API in this way obscures much of the power of counter based PRNGs. Nevertheless, it may be of value in applications that are already coded to work with the C++11 random number engines.
The MicroURNG template in MicroURNG.hpp provides the more limited functionality of a C++11 "Uniform Random Number Generator", but leaves the application in control of counters and keys and hence may be preferable to the Engine template. For example, a MicroURNG allows one to use C++11 "Random Number Distributions" without giving up control over the counters and keys.
Definition at line 68 of file Engine.hpp.
typedef CBRNG r123::Engine< CBRNG >::cbrng_type |
Definition at line 69 of file Engine.hpp.
typedef CBRNG::ctr_type r123::Engine< CBRNG >::ctr_type |
Definition at line 70 of file Engine.hpp.
typedef CBRNG::key_type r123::Engine< CBRNG >::key_type |
Definition at line 71 of file Engine.hpp.
typedef ctr_type::value_type r123::Engine< CBRNG >::result_type |
Definition at line 73 of file Engine.hpp.
typedef CBRNG::ukey_type r123::Engine< CBRNG >::ukey_type |
Definition at line 72 of file Engine.hpp.
|
inlineexplicit |
|
inlineexplicit |
Definition at line 95 of file Engine.hpp.
|
inline |
|
inline |
|
inlineexplicit |
Definition at line 126 of file Engine.hpp.
|
inlineexplicit |
Definition at line 224 of file Engine.hpp.
|
inlineexplicit |
Definition at line 227 of file Engine.hpp.
|
inline |
|
inlineprotected |
|
inline |
Definition at line 271 of file Engine.hpp.
|
inline |
Definition at line 256 of file Engine.hpp.
|
inline |
Definition at line 190 of file Engine.hpp.
|
inline |
Definition at line 252 of file Engine.hpp.
|
inlinestatic |
Definition at line 183 of file Engine.hpp.
|
inlinestatic |
Definition at line 186 of file Engine.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 276 of file Engine.hpp.
|
inline |
|
inline |
|
friend |
Definition at line 155 of file Engine.hpp.
|
friend |
Definition at line 159 of file Engine.hpp.
|
friend |
Definition at line 152 of file Engine.hpp.
|
friend |
Definition at line 163 of file Engine.hpp.
|
static |
Definition at line 181 of file Engine.hpp.
|
static |
Definition at line 180 of file Engine.hpp.
|
protected |
Definition at line 76 of file Engine.hpp.
|
protected |
Definition at line 78 of file Engine.hpp.
|
protected |
Definition at line 77 of file Engine.hpp.
|
protected |
Definition at line 79 of file Engine.hpp.