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: Add the Hoyt and the arcsine distributions as extensions.


On 10/12/2012 10:50 AM, Paolo Carlini wrote:
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.

Here is the patch committed.

Ed

Attachment: CL_hoyt_distro
Description: Text document

Attachment: patch_hoyt_distro3
Description: Text document


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