getting more random
Ed Smith-Rowland
3dw4rd@verizon.net
Thu Apr 2 01:12:00 GMT 2009
Benjamin Kosnik wrote:
> Attached is the patch from December 2008's thread about random, against
> today's tree. It seems like a good starting point modulo the unresolved
> issues with respect to the <random> interface as is used in
> 20_util/shared_ptr/thread/*.cc. As trunk is now open for stage uno, this
> seems like an opportune time to start putting this work in.
>
> Ed? Paolo?
>
> Here's my summary of outstanding issues.
>
> Paolo:
> - Wants time for algorithm analysis, getting feedback from TR1
> implementation and use, literature review.
>
> Benjamin:
> - What interface targeted?
>
> Ed:
> - Wants to actually test the quality of the distributions (and the
> engines), implementing histogram class.
> - Error handling on bad parameters in distributions. Compile, run
> time, or no errors?
>
> Please feel free to correct any of this.
>
> Since the time this was last discussed, the <random> interface
> for C++0x was specified in N2836. This specification includes concepts.
> My suggestion is to implement things like mersenne_twister_engine with
> the template parameters as specified in N2836, even though concepts are
> currently not supported. Any objections or alternate suggestions?
>
> Are there any updates on this patch, specific algorithms, or the testing
> and feedback issues?
>
> best,
> benjamin
>
>
>
>
Greetings!
I was just looking at random the other day.
Actually, I went through the latest draft and fixed a couple of small
things that changed (one template parameter range).
I'd like to go through the latest paper (with highlighted changes) and
post a patch pretty quick. I for one would like to use n2836 sans
concepts as the interface.
I've been reading up on the ziggurat and the Monty Python methods for
bell shaped distributions. It sounded like Paolo had one or more of
these coded up. That would be the way to go - the speed advantages are
huge.
One of these papers has a simple, fast and strong random number
generator (KISS) that we might use for default_random_engine. IIRC I
just typedefed it to minstd_rand0 just because it was there.
In some of the distributions I think I should make some of the random
number generators members instead of temporaries in the call operators.
Ed Smith-Rowland
More information about the Libstdc++
mailing list