This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Re: Rice distribution
- From: 3dw4rd at verizon dot net
- To: drepper at gmail dot com, 3dw4rd at verizon dot net
- Cc: paolo dot carlini at oracle dot com, daniel dot kruegler at gmail dot com, libstdc++ at gcc dot gnu dot org
- Date: Fri, 07 Sep 2012 20:45:46 -0500 (CDT)
- Subject: Re: Re: Rice distribution
I would be in favor of something like this. There was a proposal in the old TR2 for special functions for statistics by the same guy that proposed the TR1 special functions. He had these and quantile functions and inverse pdfs where suggested too. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1668.pdf is a reference. http://www.hetp.u-net.com/public/mathfunctions2.pdf is another.
These proposals are free functions rather than something connected with the distributions.
Actually, I find it odd the pdf is not there in random.
On 09/07/12, Ulrich Drepper<drepper@gmail.com> wrote:
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?