Rice distribution

Ulrich Drepper drepper@gmail.com
Fri Sep 7 23:39:00 GMT 2012


Something else I've been thinking about.  Should we add

   result_type cdf(result_type __v) { return cdf(__v, _M_param): }
   static result_type cdf(result_type __v, _M_param& __p);

for the distributions where it makes sense?  Should it be two free functions?

   template<class _Dist>
   typename _Dist::result_type
   cdf(const _Dist& __dist);

   template<class _Dist>
   typename _Dist::result_type
   cdf(const typename _Dist::param_type& __param);

I find it less elegant especially if we want to add parameter
estimation as well.

If we should add that functionality, how do we signal it is
unavailable?  Just throw an exception in the function?



More information about the Libstdc++ mailing list