std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >(3) Library Functions Manual NAME std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > SYNOPSIS #include Public Types typedef _UIntType result_type Public Member Functions template> mersenne_twister_engine (_Sseq &__q) Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence __q. mersenne_twister_engine (result_type __sd) void discard (unsigned long long __z) Discard a sequence of random numbers. result_type operator() () template _If_seed_seq< _Sseq > seed (_Sseq &__q) template auto seed (_Sseq &__q) -> _If_seed_seq< _Sseq > void seed (result_type __sd=default_seed) Static Public Member Functions static constexpr result_type max () Gets the largest possible value in the output range. static constexpr result_type min () Gets the smallest possible value in the output range. Static Public Attributes static constexpr result_type default_seed static constexpr result_type initialization_multiplier static constexpr size_t mask_bits static constexpr size_t shift_size static constexpr size_t state_size static constexpr result_type tempering_b static constexpr result_type tempering_c static constexpr result_type tempering_d static constexpr size_t tempering_l static constexpr size_t tempering_s static constexpr size_t tempering_t static constexpr size_t tempering_u static constexpr size_t word_size static constexpr result_type xor_mask Friends template std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::mersenne_twister_engine< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > &__x) Inserts the current state of a % mersenne_twister_engine random number generator engine __x into the output stream __os. bool operator== (const mersenne_twister_engine &__lhs, const mersenne_twister_engine &__rhs) Compares two % mersenne_twister_engine random number generator objects of the same type for equality. template std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, std::mersenne_twister_engine< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > &__x) Extracts the current state of a % mersenne_twister_engine random number generator engine __x from the input stream __is. Detailed Description template class std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >"A generalized feedback shift register discrete random number generator. This algorithm avoids multiplication and division and is designed to be friendly to a pipelined architecture. If the parameters are chosen correctly, this generator will produce numbers with a very long period and fairly good apparent entropy, although still not cryptographically strong. The best way to use this generator is with the predefined mt19937 class. This algorithm was originally invented by Makoto Matsumoto and Takuji Nishimura. Template Parameters __w Word size, the number of bits in each element of the state vector. __n The degree of recursion. __m The period parameter. __r The separation point bit index. __a The last row of the twist matrix. __u The first right-shift tempering matrix parameter. __d The first right-shift tempering matrix mask. __s The first left-shift tempering matrix parameter. __b The first left-shift tempering matrix mask. __t The second left-shift tempering matrix parameter. __c The second left-shift tempering matrix mask. __l The second right-shift tempering matrix parameter. __f Initialization multiplier. Since C++11 Member Typedef Documentation template typedef _UIntType std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::result_type The type of the generated random value. Constructor & Destructor Documentation template template> std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::mersenne_twister_engine (_Sseq & __q) [inline], [explicit] Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence __q. Parameters __q the seed sequence. Member Function Documentation template void std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::discard (unsigned long long __z) Discard a sequence of random numbers. References std::forward(). template static constexpr result_type std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::max () [inline], [static], [constexpr] Gets the largest possible value in the output range. template static constexpr result_type std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::min () [inline], [static], [constexpr] Gets the smallest possible value in the output range. Friends And Related Symbol Documentation template template std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > & __os, const std::mersenne_twister_engine< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > & __x) [friend] Inserts the current state of a % mersenne_twister_engine random number generator engine __x into the output stream __os. Parameters __os An output stream. __x A % mersenne_twister_engine random number generator engine. Returns The output stream with the state of __x inserted or in an error state. template bool operator== (const mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > & __lhs, const mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > & __rhs) [friend] Compares two % mersenne_twister_engine random number generator objects of the same type for equality. Parameters __lhs A % mersenne_twister_engine random number generator object. __rhs Another % mersenne_twister_engine random number generator object. Returns true if the infinite sequences of generated values would be equal, false otherwise. template template std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > & __is, std::mersenne_twister_engine< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > & __x) [friend] Extracts the current state of a % mersenne_twister_engine random number generator engine __x from the input stream __is. Parameters __is An input stream. __x A % mersenne_twister_engine random number generator engine. Returns The input stream with the state of __x extracted or in an error state. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >(3)