help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] random number generators


From: X Statistics
Subject: Re: [Help-gsl] random number generators
Date: Sun, 17 Apr 2011 12:18:38 -0300

Since speed is not important, I would recommend Generator: *
gsl_rng_mt19937,  “Mersenne Twister”. "It has a Mersenne prime period
of 2^19937
- 1 (about 10^6000)." That should probably be enough for your application.*

http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html

Matlab and R use that one as well (or at least a modified version).

You don't need to change pseudo-RNG. If you need, then at some point in your
program (after a task, a block, a function, etc)  you can save the random
number generator state (maybe instead of trying to initialize it many
times).

http://www.gnu.org/software/gsl/manual/html_node/Copying-random-number-generator-state.html


Ralph.

On Sat, Apr 16, 2011 at 6:01 PM, Toralf Niebuhr <address@hidden> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hello,
>
> we use random number generators for a simulation framework.
> Because simulations should be reproducible, every time a simulation is
> started, the generator is initialized with the same seed.
> Our current setup the following:
>
> first:
> a feedback shift-register algorithm (started with the same seed for every
> simulation and if needed explicitly set to a different seed)
> then:
> a feedback shift-register algorithm for every random variable initialized
> with a seed generated from the first generator.
>
> The first generator is optimized to generate seeds, such that the other
> generators are as much independent as possible.
>
> What would be the optimal alternative, if we want to use the random number
> generators for gsl?
> Speed is not to much important, statistic qualities are important.
>

Are the generators of gsl of such quality, such that we don't need a
> different generator for every random variable?
> Do all seeds generate the same quality of random sequences?
>
> Toralf Niebuhr
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
>
> iF4EAREIAAYFAk2qA8UACgkQ06zpjJY8ywWHUQEAj1xafGhqFk2kT7Pxdv54D1LZ
> aOSBTnAoZ3EIdkl0Y4cBAIznYJsbpopAHOIrLMD1mvm+tLGbCNyKqOc/KOcWIEkZ
> =baWF
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]