[Lemon-devel] Mersenne Twister in libstdc++
Balazs Dezso
deba at inf.elte.hu
Sun Nov 9 11:19:31 CET 2008
Hi
I have known it, but from my /usr/include/c++/tr1 directory. As I know, it is
the copy of the boost random package. The template parameters are quite nasty,
however there is typedef for the most widely used mt19937 generator. But the
interface (excluding the template parameters) is acceptable, but I think the
separation of the random number generation and the conversion to a given
distribution is not a good design decision. The most of the user want to use
the most effective random number generator (mt19937) with some distribution
mapping. I would be nervous, if I should make every time extra
object(std::uniform_int) to get integer from a given range (the objective of
the solution is obvious, the class have to be a generator).
Best, Balazs
On Thursday 06 November 2008 15:04:57 Alpár Jüttner wrote:
> Hi,
>
> Did you know that there is a Mersenne Twister random number generator
> implementation in libstdc++?
>
> http://gcc.gnu.org/onlinedocs/libstdc++/libstdc
> ++-html-USERS-4.3/a01102.html
>
> It's awesome to see how ugly interfaces can get into the std::
> namespace.
>
> Regards,
> Alpar
>
>
> _______________________________________________
> Lemon-devel mailing list
> Lemon-devel at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-devel
More information about the Lemon-devel
mailing list