The template parameter _UIntType
must be an unsigned integral type large enough to store values up to (__m-1). If the template parameter __m
is 0, the modulus __m
used is std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template parameters __a
and __c
must be less than __m
.
The size of the state is .
Definition at line 297 of file random.
typedef _UIntType std::tr1::linear_congruential< _UIntType, __a, __c, __m >::result_type |
std::tr1::linear_congruential< _UIntType, __a, __c, __m >::linear_congruential | ( | unsigned long | __x0 = 1 |
) | [inline, explicit] |
std::tr1::linear_congruential< _UIntType, __a, __c, __m >::linear_congruential | ( | _Gen & | __g | ) | [inline] |
result_type std::tr1::linear_congruential< _UIntType, __a, __c, __m >::max | ( | ) | const [inline] |
result_type std::tr1::linear_congruential< _UIntType, __a, __c, __m >::min | ( | ) | const [inline] |
linear_congruential< _UIntType, __a, __c, __m >::result_type std::tr1::linear_congruential< _UIntType, __a, __c, __m >::operator() | ( | ) |
Gets the next random number in the sequence.
Definition at line 134 of file random.tcc.
void std::tr1::linear_congruential< _UIntType, __a, __c, __m >::seed | ( | _Gen & | __g | ) | [inline] |
void std::tr1::linear_congruential< _UIntType, __a, __c, __m >::seed | ( | unsigned long | __s = 1 |
) |
Reseeds the linear_congruential random number generator engine sequence to the seed __s.
__s | The new seed. |
Definition at line 102 of file random.tcc.
bool operator!= | ( | const linear_congruential< _UIntType, __a, __c, __m > & | __lhs, | |
const linear_congruential< _UIntType, __a, __c, __m > & | __rhs | |||
) | [friend] |
Compares two linear congruential random number generator objects of the same type for inequality.
__lhs | A linear congruential random number generator object. | |
__rhs | Another linear congruential random number generator obj. |
std::basic_ostream<_CharT, _Traits>& operator<< | ( | std::basic_ostream< _CharT, _Traits > & | __os, | |
const linear_congruential< _UIntType1, __a1, __c1, __m1 > & | __lcr | |||
) | [friend] |
Writes the textual representation of the state x(i) of x to __os
.
__os | The output stream. | |
__lcr | A % linear_congruential random number generator. |
bool operator== | ( | const linear_congruential< _UIntType, __a, __c, __m > & | __lhs, | |
const linear_congruential< _UIntType, __a, __c, __m > & | __rhs | |||
) | [friend] |
Compares two linear congruential random number generator objects of the same type for equality.
__lhs | A linear congruential random number generator object. | |
__rhs | Another linear congruential random number generator obj. |
std::basic_istream<_CharT, _Traits>& operator>> | ( | std::basic_istream< _CharT, _Traits > & | __is, | |
linear_congruential< _UIntType1, __a1, __c1, __m1 > & | __lcr | |||
) | [friend] |
Sets the state of the engine by reading its textual representation from __is
.
The textual representation must have been previously written using an output stream whose imbued locale and whose type's template specialization arguments _CharT and _Traits were the same as those of __is
.
__is | The input stream. | |
__lcr | A % linear_congruential random number generator. |
const _UIntType std::tr1::linear_congruential< _UIntType, __a, __c, __m >::increment [static] |
const _UIntType std::tr1::linear_congruential< _UIntType, __a, __c, __m >::modulus [static] |
const _UIntType std::tr1::linear_congruential< _UIntType, __a, __c, __m >::multiplier [static] |