Sampling algorithms for D

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Apr 12 09:39:04 PDT 2012


On 12/04/12 18:26, James Miller wrote:
> There is support for fully all 4 types of intervals using
> std.random.uniform. You just specify the type of interval using a
> template parameter.
>
> The default is this: uniform!("[)")(a,b);
> And you want this:   uniform!("[]")(a,b);
>
> You can also do "()" and "(]" to obtain the other two intervals

Deary me -- I did know that, once upon a time, and I'd completely forgotten. 
Thanks so much for reminding me.

It was "()" I wanted ... :-)


More information about the Digitalmars-d-learn mailing list