vSMC
v3.0.0
Scalable Monte Carlo
|
Counter based RNG engine. More...
#include <vsmc/rng/counter.hpp>
Public Types | |
using | ctr_type = typename generator_type::ctr_type |
using | generator_type = Generator |
using | key_type = typename generator_type::key_type |
using | result_type = ResultType |
using | skip_type = typename ctr_type::value_type |
Public Member Functions | |
CounterEngine (result_type s=1) | |
template<typename SeedSeq > | |
CounterEngine (SeedSeq &seq, typename std::enable_if< internal::is_seed_seq< SeedSeq, ResultType, key_type, CounterEngine< ResultType, Generator >>::value >::type *=nullptr) | |
CounterEngine (const key_type &k) | |
void | ctr (const ctr_type &c) |
std::size_t | discard () |
Discard the buffer. More... | |
void | discard (skip_type nskip) |
void | key (const key_type &k) |
result_type | operator() () |
void | operator() (std::size_t n, result_type *r) |
void | seed (result_type s) |
template<typename SeedSeq > | |
void | seed (SeedSeq &seq, typename std::enable_if< internal::is_seed_seq< SeedSeq, ResultType, key_type >::value >::type *=nullptr) |
void | seed (const key_type &key) |
Static Public Member Functions | |
static constexpr result_type | max () |
static constexpr result_type | min () |
Friends | |
bool | operator!= (const CounterEngine< ResultType, Generator > &eng1, const CounterEngine< ResultType, Generator > &eng2) |
eng1 != eng2 is a necessary condition for subsequent call of operator() output different results. But it is not a sufficient condition. More... | |
template<typename CharT , typename Traits > | |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, const CounterEngine< ResultType, Generator > &eng) |
bool | operator== (const CounterEngine< ResultType, Generator > &eng1, const CounterEngine< ResultType, Generator > &eng2) |
eng1 == eng2 is a sufficent condition for subsequent call of operator() output the same results. But it is not a necessary condition. More... | |
template<typename CharT , typename Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, CounterEngine< ResultType, Generator > &eng) |
Counter based RNG engine.
ResultType | The ouptut integer type of the counter-based RNG engine |
Generator | The generator that transfer counter and key to random integer buffer.
|
Definition at line 187 of file counter.hpp.
using vsmc::CounterEngine< ResultType, Generator >::ctr_type = typename generator_type::ctr_type |
Definition at line 200 of file counter.hpp.
using vsmc::CounterEngine< ResultType, Generator >::generator_type = Generator |
Definition at line 199 of file counter.hpp.
using vsmc::CounterEngine< ResultType, Generator >::key_type = typename generator_type::key_type |
Definition at line 201 of file counter.hpp.
using vsmc::CounterEngine< ResultType, Generator >::result_type = ResultType |
Definition at line 198 of file counter.hpp.
using vsmc::CounterEngine< ResultType, Generator >::skip_type = typename ctr_type::value_type |
Definition at line 202 of file counter.hpp.
|
inlineexplicit |
Definition at line 204 of file counter.hpp.
|
inlineexplicit |
Definition at line 207 of file counter.hpp.
|
inlineexplicit |
Definition at line 216 of file counter.hpp.
|
inline |
Definition at line 242 of file counter.hpp.
|
inline |
Discard the buffer.
Definition at line 284 of file counter.hpp.
|
inline |
Definition at line 292 of file counter.hpp.
|
inline |
Definition at line 240 of file counter.hpp.
|
inlinestatic |
Definition at line 319 of file counter.hpp.
|
inlinestatic |
Definition at line 314 of file counter.hpp.
|
inline |
Definition at line 248 of file counter.hpp.
|
inline |
Definition at line 258 of file counter.hpp.
|
inline |
Definition at line 218 of file counter.hpp.
|
inline |
Definition at line 227 of file counter.hpp.
|
inline |
Definition at line 238 of file counter.hpp.
|
friend |
eng1 != eng2
is a necessary condition for subsequent call of operator()
output different results. But it is not a sufficient condition.
Definition at line 344 of file counter.hpp.
|
friend |
Definition at line 351 of file counter.hpp.
|
friend |
eng1 == eng2
is a sufficent condition for subsequent call of operator()
output the same results. But it is not a necessary condition.
Definition at line 327 of file counter.hpp.
|
friend |
Definition at line 367 of file counter.hpp.