This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Add the Hoyt and the arcsine distributions as extensions.
- From: Paolo Carlini <paolo dot carlini at oracle 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: Fri, 12 Oct 2012 16:50:23 +0200
- Subject: Re: Add the Hoyt and the arcsine distributions as extensions.
- References: <507826E0.2030904@verizon.net>
On 10/12/2012 04:19 PM, Ed Smith-Rowland wrote:
These are my last two random distribution extensions for now.
Thanks a lot!
The main on is the Hoyt distribution (AKA the Nakagami-q
distribution). It uses the arcsine with specified basis. The arcsine
distribution is a specialization of the beta distribution except I
need this to go from arbitrary (a,b) rather than (0, 1).
Tested on x86_64-linux.
OK?
Looks Ok, yes. Before committing please double check that you are not
using any C99-only cmath functions (I spotted std::sin and std::sqrt
which are Ok). This kind of comment:
+// 26.4.8.3.* Class template arcsine_distribution [rand.dist.ext.arcsine]
I would do without. Otherwise, I can already see PRs complaining that in
C++11 there is no rand.dist.ext.arcsine ;) In a couple of years, maybe.
Paolo.