Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 1999-07-16 07:50:19


At 10:00 AM 7/16/99 +0100, Paul Baxter wrote:

>I certainly have references to several random number generator tests
>(diehard etc)
>
>The better generators usually have papers associated with them
detailing
>their performance in the various random number tests and how they
compare
>with the others.

Pick your favorite, do an implementation using the same interface as
min_rand, and send it to me, along with a short description including
those references.

This seems a case where implementation variations are best handled by
template specialization. So namespace boost will have:

   random_number_generator<min_rand> rng1;
   random_number_generator<twister> rng2;

>I also think its worth, say in the case of Mersenne twister, to also
compile
>the authors original code (C code), seed the two routines the same
and
>observe the same random (sic) numbers from each implementation.

Yes. Also that is the point of the ten_thousandth() function. Maybe
there should be a millionth() function, but the orignial "minimal
standard" people used 10,000 as their test point and I just picked
that up.

> (The code I
>have is derived from a faster C implementation which was then
wrapped for
>C++).
>
>Note also that several of these routines may also have some
subtleties about
>always using say 32 bit ints for shifts/masking etc.
>Following on from the config.hpp conversations, should there be a
#define
>uint32 int or equivalent non-macro?

Ah, I was wondering when that would come up. The answer seems to me
that boost should have a boost/stdint.h[pp] header following the spec
in the C9X FDIS. If you don't know about this header, see
http://www.davros.org/c/wg14n851.txt (or the actual FDIS if you are
on the C or C++ committee.) I have the start of a boost
implementation. But more of this in a week or two when the dust
clears from other current work.

--Beman

------------------------------------------------------------------------

eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk