.TH "std::gamma_distribution< _RealType >" 3cxx "Thu Aug 2 2012" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::gamma_distribution< _RealType > \- .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef _RealType \fBinput_type\fP" .br .ti -1c .RI "typedef _RealType \fBresult_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "_RealType \fBalpha\fP () const " .br .ti -1c .RI "\fBgamma_distribution\fP (const result_type &__alpha_val=result_type(1))" .br .ti -1c .RI "template result_type \fBoperator()\fP (_UniformRandomNumberGenerator &__urng)" .br .ti -1c .RI "void \fBreset\fP ()" .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 \fBgamma_distribution\fP< _RealType1 > &__x)" .br .ti -1c .RI "template \fBstd::basic_istream\fP< _CharT, .br _Traits > & \fBoperator>>\fP (\fBstd::basic_istream\fP< _CharT, _Traits > &__is, \fBgamma_distribution\fP &__x)" .br .in -1c .SH "Detailed Description" .PP .SS "templateclass std::gamma_distribution< _RealType >" A gamma continuous distribution for random numbers\&. The formula for the gamma probability mass function is $ p(x) = \frac{1}{\Gamma(\alpha)} x^{\alpha - 1} e^{-x} $\&. .PP Definition at line 2320 of file tr1_impl/random\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::gamma_distribution\fP< _RealType >::\fBgamma_distribution\fP (const result_type &__alpha_val = \fCresult_type(1)\fP)\fC [inline]\fP, \fC [explicit]\fP" Constructs a gamma distribution with parameters $ \alpha $\&. .PP Definition at line 2332 of file tr1_impl/random\&. .SH "Member Function Documentation" .PP .SS "template _RealType \fBstd::gamma_distribution\fP< _RealType >::alpha () const\fC [inline]\fP" Gets the $ \alpha $ of the distribution\&. .PP Definition at line 2343 of file tr1_impl/random\&. .SS "template template \fBgamma_distribution\fP< _RealType >::result_type \fBstd::gamma_distribution\fP< _RealType >::operator() (_UniformRandomNumberGenerator &__urng)" Cheng's rejection algorithm GB for alpha >= 1 and a modification of Vaduva's rejection from Weibull algorithm due to Devroye for alpha < 1\&. .PP References: Cheng, R\&. C\&. 'The Generation of Gamma Random Variables with Non-integral Shape Parameter\&.' Applied Statistics, 26, 71-75, 1977\&. .PP Vaduva, I\&. 'Computer Generation of Gamma Gandom Variables by Rejection and Composition Procedures\&.' Math\&. Operationsforschung and Statistik, Series in Statistics, 8, 545-576, 1977\&. .PP Devroye, L\&. 'Non-Uniform Random Variates Generation\&.' Springer-Verlag, New York, 1986, Ch\&. IX, Sect\&. 3\&.4 (+ Errata!)\&. .PP Definition at line 1501 of file random\&.tcc\&. .PP References std::exp(), std::log(), and std::pow()\&. .SS "template void \fBstd::gamma_distribution\fP< _RealType >::reset ()\fC [inline]\fP" Resets the distribution\&. .PP Definition at line 2350 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 \fBgamma_distribution\fP< _RealType1 > &__x)\fC [friend]\fP" Inserts a gamma_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 gamma_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 template \fBstd::basic_istream\fP<_CharT, _Traits>& operator>> (\fBstd::basic_istream\fP< _CharT, _Traits > &__is, \fBgamma_distribution\fP< _RealType > &__x)\fC [friend]\fP" Extracts a gamma_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 gamma_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 .PP Definition at line 2382 of file tr1_impl/random\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.