|
template<typename _UIntType1 , size_t __w1, size_t __s1, size_t __r1, typename _CharT , typename _Traits > |
std::basic_ostream< _CharT, _Traits > & | operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::subtract_with_carry_engine< _UIntType1, __w1, __s1, __r1 > &__x) |
|
bool | operator== (const subtract_with_carry_engine &__lhs, const subtract_with_carry_engine &__rhs) |
|
template<typename _UIntType1 , size_t __w1, size_t __s1, size_t __r1, typename _CharT , typename _Traits > |
std::basic_istream< _CharT, _Traits > & | operator>> (std::basic_istream< _CharT, _Traits > &__is, std::subtract_with_carry_engine< _UIntType1, __w1, __s1, __r1 > &__x) |
|
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
class std::subtract_with_carry_engine< _UIntType, __w, __s, __r >
The Marsaglia-Zaman generator.
This is a model of a Generalized Fibonacci discrete random number generator, sometimes referred to as the SWC generator.
A discrete random number generator that produces pseudorandom numbers using:
The size of the state is and the maximum period of the generator is .
Definition at line 659 of file random.h.
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
template<typename _Sseq , typename = typename std::enable_if<!std::is_same<_Sseq, subtract_with_carry_engine>::value> ::type>
Constructs a subtract_with_carry_engine random number engine seeded from the seed sequence __q
.
- Parameters
-
Definition at line 696 of file random.h.
template<typename _UIntType , size_t __w, size_t __s, size_t __r>
Seeds the initial state of the random number generator.
N1688[4.19] modifies this as follows. If __value
== 0, sets value to 19780503. In any case, with a linear congruential generator lcg(i) having parameters , sets to respectively. If set carry to 1, otherwise sets carry to 0.
Definition at line 543 of file bits/random.tcc.
Referenced by std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::discard().
template<typename _UIntType , size_t __w, size_t __s, size_t __r>
template<typename _Sseq >
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
template<typename _UIntType1 , size_t __w1, size_t __s1, size_t __r1, typename _CharT , typename _Traits >
Inserts the current state of a % subtract_with_carry_engine random number generator engine __x
into the output stream __os
.
- Parameters
-
__os | An output stream. |
__x | A % subtract_with_carry_engine random number generator engine. |
- Returns
- The output stream with the state of
__x
inserted or in an error state.
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
template<typename _UIntType1 , size_t __w1, size_t __s1, size_t __r1, typename _CharT , typename _Traits >
Extracts the current state of a % subtract_with_carry_engine random number generator engine __x
from the input stream __is
.
- Parameters
-
__is | An input stream. |
__x | A % subtract_with_carry_engine random number generator engine. |
- Returns
- The input stream with the state of
__x
extracted or in an error state.