|
| XorshiftEngine (result_type s=1) |
|
template<typename SeedSeq > |
| XorshiftEngine (SeedSeq &seq, typename cxx11::enable_if< internal::is_seed_seq< SeedSeq, result_type, XorshiftEngine< ResultType, K, A, B, C, D, R, S > >::value >::type *=nullptr) |
|
void | discard (std::size_t nskip) |
|
result_type | operator() () |
|
void | seed (result_type s) |
|
template<typename SeedSeq > |
void | seed (SeedSeq &seq, typename cxx11::enable_if< internal::is_seed_seq< SeedSeq, result_type, XorshiftEngine< ResultType, K, A, B, C, D, R, S > >::value >::type *=nullptr) |
|
|
bool | operator!= (const XorshiftEngine< ResultType, K, A, B, C, D, R, S > &eng1, const XorshiftEngine< ResultType, K, A, B, C, D, R, S > &eng2) |
|
template<typename CharT , typename Traits > |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, const XorshiftEngine< ResultType, K, A, B, C, D, R, S > &eng) |
|
bool | operator== (const XorshiftEngine< ResultType, K, A, B, C, D, R, S > &eng1, const XorshiftEngine< ResultType, K, A, B, C, D, R, S > &eng2) |
|
template<typename CharT , typename Traits > |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, XorshiftEngine< ResultType, K, A, B, C, D, R, S > &eng) |
|
template<typename ResultType, std::size_t K, unsigned A, unsigned B, unsigned C, unsigned D, std::size_t R, std::size_t S>
class vsmc::XorshiftEngine< ResultType, K, A, B, C, D, R, S >
Xorshift RNG engine.
Use Marsaglia's Xorshift algorithm if K == 1
, otherwise use Brent's improvement. Marsaglia's multi-words version is equivalent to set C = 0
, R = K
, and S = 1
.
- Template Parameters
-
ResultType | An unsigned 32- or 64-bits integer type |
K | Number of integers of type ResultType representing the states |
A | Bits of first left shift |
B | Bits of first right shift |
C | Bits of second left shift |
D | Bits of second right shift (unused if K = 1 ) |
R | Index of first xorshift (unused if K = 1 ) |
S | Index of second xorshift (unused if K = 1 ) |
Definition at line 214 of file xorshift.hpp.
template<typename ResultType, std::size_t K, unsigned A, unsigned B, unsigned C, unsigned D, std::size_t R, std::size_t S>
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< |
( |
std::basic_ostream< CharT, Traits > & |
os, |
|
|
const XorshiftEngine< ResultType, K, A, B, C, D, R, S > & |
eng |
|
) |
| |
|
friend |
template<typename ResultType, std::size_t K, unsigned A, unsigned B, unsigned C, unsigned D, std::size_t R, std::size_t S>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> |
( |
std::basic_istream< CharT, Traits > & |
is, |
|
|
XorshiftEngine< ResultType, K, A, B, C, D, R, S > & |
eng |
|
) |
| |
|
friend |