Add the Hoyt and the arcsine distributions as extensions.
Paolo Carlini
paolo.carlini@oracle.com
Fri Oct 12 14:50:00 GMT 2012
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.
More information about the Libstdc++
mailing list