.TH "std::uniform_int< _IntType >" 3cxx "Thu Aug 2 2012" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::uniform_int< _IntType > \- .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef _IntType \fBinput_type\fP" .br .ti -1c .RI "typedef _IntType \fBresult_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBresult_type\fP \fBmax\fP () const " .br .ti -1c .RI "\fBresult_type\fP \fBmin\fP () const " .br .ti -1c .RI "template \fBresult_type\fP \fBoperator()\fP (_UniformRandomNumberGenerator &__urng)" .br .ti -1c .RI "template \fBresult_type\fP \fBoperator()\fP (_UniformRandomNumberGenerator &__urng, \fBresult_type\fP __n)" .br .ti -1c .RI "void \fBreset\fP ()" .br .ti -1c .RI "\fBuniform_int\fP (_IntType __min=0, _IntType __max=9)" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "template \fBstd::basic_ostream\fP< _CharT, .br _Traits > & \fBoperator<<\fP (\fBstd::basic_ostream\fP< _CharT, _Traits > &__os, const \fBuniform_int\fP< _IntType1 > &__x)" .br .ti -1c .RI "template \fBstd::basic_istream\fP< _CharT, .br _Traits > & \fBoperator>>\fP (\fBstd::basic_istream\fP< _CharT, _Traits > &__is, \fBuniform_int\fP< _IntType1 > &__x)" .br .in -1c .SH "Detailed Description" .PP .SS "templateclass std::uniform_int< _IntType >" Uniform discrete distribution for random numbers\&. A discrete random distribution on the range $[min, max]$ with equal probability throughout the range\&. .PP Definition at line 1560 of file tr1_impl/random\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _IntType \fBstd::uniform_int\fP< _IntType >::\fBinput_type\fP" The type of the parameters of the distribution\&. .PP Definition at line 1566 of file tr1_impl/random\&. .SS "template typedef _IntType \fBstd::uniform_int\fP< _IntType >::\fBresult_type\fP" The type of the range of the distribution\&. .PP Definition at line 1568 of file tr1_impl/random\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::uniform_int\fP< _IntType >::\fBuniform_int\fP (_IntType__min = \fC0\fP, _IntType__max = \fC9\fP)\fC [inline]\fP, \fC [explicit]\fP" Constructs a uniform distribution object\&. .PP Definition at line 1575 of file tr1_impl/random\&. .SH "Member Function Documentation" .PP .SS "template \fBresult_type\fP \fBstd::uniform_int\fP< _IntType >::max () const\fC [inline]\fP" Gets the inclusive upper bound of the distribution range\&. .PP Definition at line 1592 of file tr1_impl/random\&. .SS "template \fBresult_type\fP \fBstd::uniform_int\fP< _IntType >::min () const\fC [inline]\fP" Gets the inclusive lower bound of the distribution range\&. .PP Definition at line 1585 of file tr1_impl/random\&. .SS "template template \fBresult_type\fP \fBstd::uniform_int\fP< _IntType >::operator() (_UniformRandomNumberGenerator &__urng)\fC [inline]\fP" Gets a uniformly distributed random number in the range $(min, max)$\&. .PP Definition at line 1609 of file tr1_impl/random\&. .SS "template template \fBresult_type\fP \fBstd::uniform_int\fP< _IntType >::operator() (_UniformRandomNumberGenerator &__urng, \fBresult_type\fP__n)\fC [inline]\fP" Gets a uniform random number in the range $[0, n)$\&. .PP This function is aimed at use with std::random_shuffle\&. .PP Definition at line 1624 of file tr1_impl/random\&. .SS "template void \fBstd::uniform_int\fP< _IntType >::reset ()\fC [inline]\fP" Resets the distribution state\&. .PP Does nothing for the uniform integer distribution\&. .PP Definition at line 1601 of file tr1_impl/random\&. .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 \fBuniform_int\fP< _IntType1 > &__x)\fC [friend]\fP" Inserts a uniform_int random number distribution \fC__x\fP into the output stream \fCos\fP\&. .PP \fBParameters:\fP .RS 4 \fI__os\fP An output stream\&. .br \fI__x\fP A uniform_int random number distribution\&. .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 template \fBstd::basic_istream\fP<_CharT, _Traits>& operator>> (\fBstd::basic_istream\fP< _CharT, _Traits > &__is, \fBuniform_int\fP< _IntType1 > &__x)\fC [friend]\fP" Extracts a uniform_int random number distribution \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 uniform_int random number generator engine\&. .RE .PP \fBReturns:\fP .RS 4 The input stream with \fC__x\fP extracted or in an error state\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.