.TH "std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >" 3cxx "Wed Jul 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef _UIntType \fBresult_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "template> \fBmersenne_twister_engine\fP (_Sseq &__q)" .br .RI "Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence \fC__q\fP\&. " .ti -1c .RI "\fBmersenne_twister_engine\fP (\fBresult_type\fP __sd)" .br .ti -1c .RI "void \fBdiscard\fP (unsigned long long __z)" .br .RI "Discard a sequence of random numbers\&. " .ti -1c .RI "\fBresult_type\fP \fBoperator()\fP ()" .br .ti -1c .RI "template _If_seed_seq< _Sseq > \fBseed\fP (_Sseq &__q)" .br .ti -1c .RI "template auto \fBseed\fP (_Sseq &__q) \-> _If_seed_seq< _Sseq >" .br .ti -1c .RI "void \fBseed\fP (\fBresult_type\fP __sd=default_seed)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static constexpr \fBresult_type\fP \fBmax\fP ()" .br .RI "Gets the largest possible value in the output range\&. " .ti -1c .RI "static constexpr \fBresult_type\fP \fBmin\fP ()" .br .RI "Gets the smallest possible value in the output range\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr \fBresult_type\fP \fBdefault_seed\fP" .br .ti -1c .RI "static constexpr \fBresult_type\fP \fBinitialization_multiplier\fP" .br .ti -1c .RI "static constexpr size_t \fBmask_bits\fP" .br .ti -1c .RI "static constexpr size_t \fBshift_size\fP" .br .ti -1c .RI "static constexpr size_t \fBstate_size\fP" .br .ti -1c .RI "static constexpr \fBresult_type\fP \fBtempering_b\fP" .br .ti -1c .RI "static constexpr \fBresult_type\fP \fBtempering_c\fP" .br .ti -1c .RI "static constexpr \fBresult_type\fP \fBtempering_d\fP" .br .ti -1c .RI "static constexpr size_t \fBtempering_l\fP" .br .ti -1c .RI "static constexpr size_t \fBtempering_s\fP" .br .ti -1c .RI "static constexpr size_t \fBtempering_t\fP" .br .ti -1c .RI "static constexpr size_t \fBtempering_u\fP" .br .ti -1c .RI "static constexpr size_t \fBword_size\fP" .br .ti -1c .RI "static constexpr \fBresult_type\fP \fBxor_mask\fP" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "template \fBstd::basic_ostream\fP< _CharT, _Traits > & \fBoperator<<\fP (\fBstd::basic_ostream\fP< _CharT, _Traits > &__os, const \fBstd::mersenne_twister_engine\fP< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > &__x)" .br .RI "Inserts the current state of a % mersenne_twister_engine random number generator engine \fC__x\fP into the output stream \fC__os\fP\&. " .ti -1c .RI "bool \fBoperator==\fP (const \fBmersenne_twister_engine\fP &__lhs, const \fBmersenne_twister_engine\fP &__rhs)" .br .RI "Compares two % mersenne_twister_engine random number generator objects of the same type for equality\&. " .ti -1c .RI "template \fBstd::basic_istream\fP< _CharT, _Traits > & \fBoperator>>\fP (\fBstd::basic_istream\fP< _CharT, _Traits > &__is, \fBstd::mersenne_twister_engine\fP< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > &__x)" .br .RI "Extracts the current state of a % mersenne_twister_engine random number generator engine \fC__x\fP from the input stream \fC__is\fP\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br 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\&. .PP 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\&. .PP The best way to use this generator is with the predefined mt19937 class\&. .PP This algorithm was originally invented by Makoto Matsumoto and Takuji Nishimura\&. .PP \fBTemplate Parameters\fP .RS 4 \fI__w\fP Word size, the number of bits in each element of the state vector\&. .br \fI__n\fP The degree of recursion\&. .br \fI__m\fP The period parameter\&. .br \fI__r\fP The separation point bit index\&. .br \fI__a\fP The last row of the twist matrix\&. .br \fI__u\fP The first right-shift tempering matrix parameter\&. .br \fI__d\fP The first right-shift tempering matrix mask\&. .br \fI__s\fP The first left-shift tempering matrix parameter\&. .br \fI__b\fP The first left-shift tempering matrix mask\&. .br \fI__t\fP The second left-shift tempering matrix parameter\&. .br \fI__c\fP The second left-shift tempering matrix mask\&. .br \fI__l\fP The second right-shift tempering matrix parameter\&. .br \fI__f\fP Initialization multiplier\&. .RE .PP .PP Definition at line 472 of file random\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _UIntType \fBstd::mersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::\fBresult_type\fP" The type of the generated random value\&. .PP Definition at line 507 of file random\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template template> \fBstd::mersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::\fBmersenne_twister_engine\fP (_Sseq & __q)\fC [inline]\fP, \fC [explicit]\fP" .PP Constructs a mersenne_twister_engine random number generator engine seeded from the seed sequence \fC__q\fP\&. .PP \fBParameters\fP .RS 4 \fI__q\fP the seed sequence\&. .RE .PP .PP Definition at line 541 of file random\&.h\&. .SH "Member Function Documentation" .PP .SS "template void \fBstd::mersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::discard (unsigned long long __z)" .PP Discard a sequence of random numbers\&. .PP Definition at line 431 of file bits/random\&.tcc\&. .SS "template static constexpr \fBresult_type\fP \fBstd::mersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::max ()\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Gets the largest possible value in the output range\&. .PP Definition at line 562 of file random\&.h\&. .SS "template static constexpr \fBresult_type\fP \fBstd::mersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >::min ()\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Gets the smallest possible value in the output range\&. .PP Definition at line 555 of file random\&.h\&. .SH "Friends And Related Function Documentation" .PP .SS "template template \fBstd::basic_ostream\fP<_CharT, _Traits>& operator<< (\fBstd::basic_ostream\fP< _CharT, _Traits > & __os, const \fBstd::mersenne_twister_engine\fP< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > & __x)\fC [friend]\fP" .PP Inserts the current state of a % mersenne_twister_engine random number generator engine \fC__x\fP into the output stream \fC__os\fP\&. .PP \fBParameters\fP .RS 4 \fI__os\fP An output stream\&. .br \fI__x\fP A % mersenne_twister_engine random number generator engine\&. .RE .PP \fBReturns\fP .RS 4 The output stream with the state of \fC__x\fP inserted or in an error state\&. .RE .PP .SS "template bool operator== (const \fBmersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > & __lhs, const \fBmersenne_twister_engine\fP< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > & __rhs)\fC [friend]\fP" .PP Compares two % mersenne_twister_engine random number generator objects of the same type for equality\&. .PP \fBParameters\fP .RS 4 \fI__lhs\fP A % mersenne_twister_engine random number generator object\&. .br \fI__rhs\fP Another % mersenne_twister_engine random number generator object\&. .RE .PP \fBReturns\fP .RS 4 true if the infinite sequences of generated values would be equal, false otherwise\&. .RE .PP .PP Definition at line 587 of file random\&.h\&. .SS "template template \fBstd::basic_istream\fP<_CharT, _Traits>& operator>> (\fBstd::basic_istream\fP< _CharT, _Traits > & __is, \fBstd::mersenne_twister_engine\fP< _UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1 > & __x)\fC [friend]\fP" .PP Extracts the current state of a % mersenne_twister_engine random number generator engine \fC__x\fP from the input stream \fC__is\fP\&. .PP \fBParameters\fP .RS 4 \fI__is\fP An input stream\&. .br \fI__x\fP A % mersenne_twister_engine random number generator engine\&. .RE .PP \fBReturns\fP .RS 4 The input stream with the state of \fC__x\fP extracted or in an error state\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.