/search.css" rel="stylesheet" type="text/css"/> /search.js">
#include <Random123/conventional/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 (const Engine &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 (const ukey_type &uk) | |
Engine (ukey_type &uk) | |
void | seed (const ukey_type &uk) |
void | seed (ukey_type &uk) |
ctr_type | operator() (const ctr_type &c) const |
key_type | getkey () const |
void | setkey (const key_type &k) |
std::pair< ctr_type, result_type > | getcounter () const |
void | setcounter (const ctr_type &_c, result_type _elem) |
void | setcounter (const std::pair< ctr_type, result_type > &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== (const Engine &lhs, const Engine &rhs) |
bool | operator!= (const Engine &lhs, const Engine &rhs) |
std::ostream & | operator<< (std::ostream &os, const Engine &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++0x "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++0x random number engines.
The MicroURNG template in MicroURNG.hpp provides the more limited functionality of a C++0x "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++0x "Random Number Distributions" without giving up control over the counters and keys.
typedef CBRNG r123::Engine< CBRNG >::cbrng_type |
typedef CBRNG::ctr_type r123::Engine< CBRNG >::ctr_type |
typedef CBRNG::key_type r123::Engine< CBRNG >::key_type |
typedef ctr_type::value_type r123::Engine< CBRNG >::result_type |
typedef CBRNG::ukey_type r123::Engine< CBRNG >::ukey_type |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |