This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Implement Nakagami distribution as an extension.
- From: Ulrich Drepper <drepper at gmail dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 17 Sep 2012 12:52:13 -0400
- Subject: Re: Implement Nakagami distribution as an extension.
- References: <50573F1A.1050000@verizon.net>
On Mon, Sep 17, 2012 at 11:17 AM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
> Here is a Nakagami continuous distribution.
Just a nit: the operator() implementations are not consistent. In the
case without param_type parameter you have a local variable, in the
case with explicit parameter you don't. I had to look twice to see
there is no real difference.
One question I've been asking myself also for some other
distributions. Storing the mu and omega values in the object locally
is not really necessary. They can be computed from the gamma
distribution parameters. We don't need a local param_type member.
This has an even bigger effect on the in/out functions. All that
would be needed is to print/read the _M_gd member.
It's likely not a big thing but perhaps this can open over other
venues. Would it be useful to have, perhaps, the
nakagami_distribution type being derived from gamma_distribution?...