This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement Nakagami distribution as an extension.


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?...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]