.TH "std::geometric_distribution< _IntType >" 3cxx "Sun Jan 8 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::geometric_distribution< _IntType > \- A discrete geometric 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 "\fBgeometric_distribution\fP (const \fBparam_type\fP &__p)" .br .ti -1c .RI "\fBgeometric_distribution\fP (double __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 \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 "double \fBp\fP () const" .br .RI "Returns the distribution parameter \fCp\fP\&. " .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 \fBgeometric_distribution\fP &__d1, const \fBgeometric_distribution\fP &__d2)" .br .RI "Return true if two geometric distributions have the same parameters\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br class std::geometric_distribution< _IntType >"A discrete geometric random number distribution\&. The formula for the geometric probability density function is $p(i|p) = p(1 - p)^{i}$ where $p$ is the parameter of the distribution\&. .PP Definition at line \fB3983\fP of file \fBrandom\fP\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _IntType \fBstd::geometric_distribution\fP< _IntType >::result_type" The type of the range of the distribution\&. .PP Definition at line \fB3990\fP of file \fBrandom\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::geometric_distribution\fP< _IntType >::geometric_distribution ()\fC [inline]\fP" .PP Definition at line \fB4032\fP of file \fBrandom\fP\&. .SS "template \fBstd::geometric_distribution\fP< _IntType >::geometric_distribution (double __p)\fC [inline]\fP, \fC [explicit]\fP" .PP Definition at line \fB4035\fP of file \fBrandom\fP\&. .SS "template \fBstd::geometric_distribution\fP< _IntType >::geometric_distribution (const \fBparam_type\fP & __p)\fC [inline]\fP, \fC [explicit]\fP" .PP Definition at line \fB4040\fP of file \fBrandom\fP\&. .SH "Member Function Documentation" .PP .SS "template template void \fBstd::geometric_distribution\fP< _IntType >::__generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator & __urng)\fC [inline]\fP" .PP Definition at line \fB4104\fP of file \fBrandom\fP\&. .SS "template template void \fBstd::geometric_distribution\fP< _IntType >::__generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator & __urng, const \fBparam_type\fP & __p)\fC [inline]\fP" .PP Definition at line \fB4111\fP of file \fBrandom\fP\&. .SS "template template void \fBstd::geometric_distribution\fP< _IntType >::__generate (\fBresult_type\fP * __f, \fBresult_type\fP * __t, _UniformRandomNumberGenerator & __urng, const \fBparam_type\fP & __p)\fC [inline]\fP" .PP Definition at line \fB4118\fP of file \fBrandom\fP\&. .SS "template \fBresult_type\fP \fBstd::geometric_distribution\fP< _IntType >::max () const\fC [inline]\fP" .PP Returns the least upper bound value of the distribution\&. .PP Definition at line \fB4085\fP of file \fBrandom\fP\&. .PP References \fBstd::numeric_limits< _Tp >::max()\fP\&. .SS "template \fBresult_type\fP \fBstd::geometric_distribution\fP< _IntType >::min () const\fC [inline]\fP" .PP Returns the greatest lower bound value of the distribution\&. .PP Definition at line \fB4078\fP of file \fBrandom\fP\&. .SS "template template \fBresult_type\fP \fBstd::geometric_distribution\fP< _IntType >::operator() (_UniformRandomNumberGenerator & __urng)\fC [inline]\fP" .PP Generating functions\&. .PP Definition at line \fB4093\fP of file \fBrandom\fP\&. .PP References \fBstd::geometric_distribution< _IntType >::operator()()\fP\&. .PP Referenced by \fBstd::geometric_distribution< _IntType >::operator()()\fP\&. .SS "template template \fBgeometric_distribution\fP< _IntType >\fB::result_type\fP \fBstd::geometric_distribution\fP< _IntType >::operator() (_UniformRandomNumberGenerator & __urng, const \fBparam_type\fP & __p)" .PP Definition at line \fB1050\fP of file \fBbits/random\&.tcc\fP\&. .SS "template double \fBstd::geometric_distribution\fP< _IntType >::p () const\fC [inline]\fP" .PP Returns the distribution parameter \fCp\fP\&. .PP Definition at line \fB4056\fP of file \fBrandom\fP\&. .SS "template \fBparam_type\fP \fBstd::geometric_distribution\fP< _IntType >::param () const\fC [inline]\fP" .PP Returns the parameter set of the distribution\&. .PP Definition at line \fB4063\fP of file \fBrandom\fP\&. .PP Referenced by \fBstd::operator>>()\fP\&. .SS "template void \fBstd::geometric_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 \fB4071\fP of file \fBrandom\fP\&. .SS "template void \fBstd::geometric_distribution\fP< _IntType >::reset ()\fC [inline]\fP" .PP Resets the distribution state\&. Does nothing for the geometric distribution\&. .PP Definition at line \fB4050\fP of file \fBrandom\fP\&. .SH "Friends And Related Function Documentation" .PP .SS "template bool operator== (const \fBgeometric_distribution\fP< _IntType > & __d1, const \fBgeometric_distribution\fP< _IntType > & __d2)\fC [friend]\fP" .PP Return true if two geometric distributions have the same parameters\&. .PP Definition at line \fB4128\fP of file \fBrandom\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.