.TH "std::discrete_distribution< _IntType >" 3cxx "Tue Jul 18 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::discrete_distribution< _IntType > \- A discrete_distribution random number distribution\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .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 "template \fBdiscrete_distribution\fP (_InputIterator __wbegin, _InputIterator __wend)" .br .ti -1c .RI "\fBdiscrete_distribution\fP (const \fBparam_type\fP &__p)" .br .ti -1c .RI "\fBdiscrete_distribution\fP (\fBinitializer_list\fP< double > __wl)" .br .ti -1c .RI "template \fBdiscrete_distribution\fP (size_t __nw, double __xmin, double __xmax, _Func __fw)" .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 \fBmax\fP () const" .br .RI "Returns the least upper bound value of the distribution\&. " .ti -1c .RI "\fBresult_type\fP \fBmin\fP () const" .br .RI "Returns the greatest lower bound value of the distribution\&. " .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 "\fBstd::vector\fP< double > \fBprobabilities\fP () const" .br .RI "Returns the probabilities of the distribution\&. " .ti -1c .RI "void \fBreset\fP ()" .br .RI "Resets the distribution state\&. " .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::discrete_distribution\fP< _IntType1 > &__x)" .br .RI "Inserts a discrete_distribution random number distribution \fC__x\fP into the output stream \fC__os\fP\&. " .ti -1c .RI "bool \fBoperator==\fP (const \fBdiscrete_distribution\fP &__d1, const \fBdiscrete_distribution\fP &__d2)" .br .RI "Return true if two discrete distributions have the same parameters\&. " .ti -1c .RI "template \fBstd::basic_istream\fP< _CharT, _Traits > & \fBoperator>>\fP (\fBstd::basic_istream\fP< _CharT, _Traits > &__is, \fBstd::discrete_distribution\fP< _IntType1 > &__x)" .br .RI "Extracts a discrete_distribution random number distribution \fC__x\fP from the input stream \fC__is\fP\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br class std::discrete_distribution< _IntType >"A discrete_distribution random number distribution\&. The formula for the discrete probability mass function is .SH "Member Typedef Documentation" .PP .SS "template typedef _IntType \fBstd::discrete_distribution\fP< _IntType >::result_type" The type of the range of the distribution\&. .SH "Member Function Documentation" .PP .SS "template \fBresult_type\fP \fBstd::discrete_distribution\fP< _IntType >::max () const\fC [inline]\fP" .PP Returns the least upper bound value of the distribution\&. .PP References \fBstd::vector< _Tp, _Alloc >::empty()\fP, and \fBstd::vector< _Tp, _Alloc >::size()\fP\&. .SS "template \fBresult_type\fP \fBstd::discrete_distribution\fP< _IntType >::min () const\fC [inline]\fP" .PP Returns the greatest lower bound value of the distribution\&. .SS "template template \fBresult_type\fP \fBstd::discrete_distribution\fP< _IntType >::operator() (_UniformRandomNumberGenerator & __urng)\fC [inline]\fP" .PP Generating functions\&. .PP References \fBstd::discrete_distribution< _IntType >::operator()()\fP\&. .PP Referenced by \fBstd::discrete_distribution< _IntType >::operator()()\fP\&. .SS "template \fBparam_type\fP \fBstd::discrete_distribution\fP< _IntType >::param () const\fC [inline]\fP" .PP Returns the parameter set of the distribution\&. .SS "template void \fBstd::discrete_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 .SS "template \fBstd::vector\fP< double > \fBstd::discrete_distribution\fP< _IntType >::probabilities () const\fC [inline]\fP" .PP Returns the probabilities of the distribution\&. .PP References \fBstd::vector< _Tp, _Alloc >::empty()\fP\&. .SS "template void \fBstd::discrete_distribution\fP< _IntType >::reset ()\fC [inline]\fP" .PP Resets the distribution state\&. .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::discrete_distribution\fP< _IntType1 > & __x)\fC [friend]\fP" .PP Inserts a discrete_distribution random number distribution \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 discrete_distribution 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 bool operator== (const \fBdiscrete_distribution\fP< _IntType > & __d1, const \fBdiscrete_distribution\fP< _IntType > & __d2)\fC [friend]\fP" .PP Return true if two discrete distributions have the same parameters\&. .SS "template template \fBstd::basic_istream\fP< _CharT, _Traits > & operator>> (\fBstd::basic_istream\fP< _CharT, _Traits > & __is, \fBstd::discrete_distribution\fP< _IntType1 > & __x)\fC [friend]\fP" .PP Extracts a discrete_distribution 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 discrete_distribution 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\&.