.TH "std::uniform_int_distribution< _IntType >" 3cxx "Sun Jan 10 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::uniform_int_distribution< _IntType > \- Uniform discrete distribution for random numbers\&. A discrete random distribution on the range $[min, max]$ with equal probability throughout the range\&. .SH SYNOPSIS .br .PP .SS "Classes" .in +1c .ti -1c .RI "struct \fBparam_type\fP" .br .in -1c .SS "Public Types" .in +1c .ti -1c .RI "typedef _IntType \fBresult_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBuniform_int_distribution\fP ()" .br .RI "Constructs a uniform distribution object\&. " .ti -1c .RI "\fBuniform_int_distribution\fP (_IntType __a, _IntType __b=\fBnumeric_limits\fP< _IntType >::\fBmax\fP())" .br .RI "Constructs a uniform distribution object\&. " .ti -1c .RI "\fBuniform_int_distribution\fP (const \fBparam_type\fP &__p)" .br .ti -1c .RI "template void \fB__generate\fP (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng)" .br .ti -1c .RI "template void \fB__generate\fP (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const \fBparam_type\fP &__p)" .br .ti -1c .RI "template void \fB__generate\fP (\fBresult_type\fP *__f, \fBresult_type\fP *__t, _UniformRandomNumberGenerator &__urng, const \fBparam_type\fP &__p)" .br .ti -1c .RI "\fBresult_type\fP \fBa\fP () const" .br .ti -1c .RI "\fBresult_type\fP \fBb\fP () const" .br .ti -1c .RI "\fBresult_type\fP \fBmax\fP () const" .br .RI "Returns the inclusive upper bound of the distribution range\&. " .ti -1c .RI "\fBresult_type\fP \fBmin\fP () const" .br .RI "Returns the inclusive lower bound of the distribution range\&. " .ti -1c .RI "template \fBresult_type\fP \fBoperator()\fP (_UniformRandomNumberGenerator &__urng)" .br .RI "Generating functions\&. " .ti -1c .RI "template \fBresult_type\fP \fBoperator()\fP (_UniformRandomNumberGenerator &__urng, const \fBparam_type\fP &__p)" .br .ti -1c .RI "\fBparam_type\fP \fBparam\fP () const" .br .RI "Returns the parameter set of the distribution\&. " .ti -1c .RI "void \fBparam\fP (const \fBparam_type\fP &__param)" .br .RI "Sets the parameter set of the distribution\&. " .ti -1c .RI "void \fBreset\fP ()" .br .RI "Resets the distribution state\&. " .in -1c .SS "Friends" .in +1c .ti -1c .RI "bool \fBoperator==\fP (const \fBuniform_int_distribution\fP &__d1, const \fBuniform_int_distribution\fP &__d2)" .br .RI "Return true if two uniform integer distributions have the same parameters\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br class std::uniform_int_distribution< _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 74 of file uniform_int_dist\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _IntType \fBstd::uniform_int_distribution\fP< _IntType >::\fBresult_type\fP" The type of the range of the distribution\&. .PP Definition at line 81 of file uniform_int_dist\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::uniform_int_distribution\fP< _IntType >::\fBuniform_int_distribution\fP ()\fC [inline]\fP" .PP Constructs a uniform distribution object\&. .PP Definition at line 122 of file uniform_int_dist\&.h\&. .SS "template \fBstd::uniform_int_distribution\fP< _IntType >::\fBuniform_int_distribution\fP (_IntType __a, _IntType __b = \fC\fBnumeric_limits\fP<_IntType>::\fBmax\fP()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Constructs a uniform distribution object\&. .PP Definition at line 128 of file uniform_int_dist\&.h\&. .SH "Member Function Documentation" .PP .SS "template \fBresult_type\fP \fBstd::uniform_int_distribution\fP< _IntType >::max () const\fC [inline]\fP" .PP Returns the inclusive upper bound of the distribution range\&. .PP Definition at line 180 of file uniform_int_dist\&.h\&. .SS "template \fBresult_type\fP \fBstd::uniform_int_distribution\fP< _IntType >::min () const\fC [inline]\fP" .PP Returns the inclusive lower bound of the distribution range\&. .PP Definition at line 173 of file uniform_int_dist\&.h\&. .SS "template template \fBresult_type\fP \fBstd::uniform_int_distribution\fP< _IntType >::operator() (_UniformRandomNumberGenerator & __urng)\fC [inline]\fP" .PP Generating functions\&. .PP Definition at line 188 of file uniform_int_dist\&.h\&. .SS "template \fBparam_type\fP \fBstd::uniform_int_distribution\fP< _IntType >::param () const\fC [inline]\fP" .PP Returns the parameter set of the distribution\&. .PP Definition at line 158 of file uniform_int_dist\&.h\&. .PP Referenced by std::operator>>()\&. .SS "template void \fBstd::uniform_int_distribution\fP< _IntType >::param (const \fBparam_type\fP & __param)\fC [inline]\fP" .PP Sets the parameter set of the distribution\&. .PP \fBParameters\fP .RS 4 \fI__param\fP The new parameter set of the distribution\&. .RE .PP .PP Definition at line 166 of file uniform_int_dist\&.h\&. .SS "template void \fBstd::uniform_int_distribution\fP< _IntType >::reset ()\fC [inline]\fP" .PP Resets the distribution state\&. Does nothing for the uniform integer distribution\&. .PP Definition at line 144 of file uniform_int_dist\&.h\&. .SH "Friends And Related Function Documentation" .PP .SS "template bool operator== (const \fBuniform_int_distribution\fP< _IntType > & __d1, const \fBuniform_int_distribution\fP< _IntType > & __d2)\fC [friend]\fP" .PP Return true if two uniform integer distributions have the same parameters\&. .PP Definition at line 223 of file uniform_int_dist\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.