00001 //=========================================================================== 00043 //=========================================================================== 00044 00045 #include "Rng/DiffGeometric.h" 00046 00047 00048 //======================================================================== 00067 long DiffGeometric::operator()(double mean) 00068 { 00069 return Geometric::operator()(mean) - Geometric::operator()(mean); 00070 } 00071 00072 00073 00074 //======================================================================== 00093 long DiffGeometric::operator()() 00094 { 00095 return Geometric::operator()() - Geometric::operator()(); 00096 } 00097 00098 00099 //======================================================================== 00117 double DiffGeometric::p(const long& x) const 00118 { 00119 return pMean * pow(1 - pMean, abs(x)) / (2 - pMean); 00120 } 00121 00122 00123