|
From: | David Schaich |
Subject: | Re: [Help-gsl] random number generator |
Date: | Thu, 11 May 2006 13:07:02 -0400 |
User-agent: | Thunderbird 1.5.0.2 (X11/20060420) |
Hi Amy, Try this: const gsl_rng * r = gsl_rng_alloc(gsl_rng_mt19937) ; gsl_rng_set(r, s);Right now that will use the Mersenne Twister generator. You can change the argument of gsl_rng_alloc to use the generator of your choice. There's a list of available generators at
http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Generation.html -David Schaich u4r07 wrote:
hi, attached is my program, i'm trying to get a file with lots of random numbers inhowever when i try and change the seed there is a problem i keep getting a compiling error message for the gsl function: gsl_rng_set(const gsl_rng * r, s); which is inside a for loop the error message is: visit.c: In function `main': visit.c:27: parse error before `const' [which is related to that function above] can you help me please? thanks amy duffin
[Prev in Thread] | Current Thread | [Next in Thread] |