This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RN generators Seed


On Wed, 27 Aug 2003, Robert G. Brown wrote:

>  /*
>   * and add the new one(s)...
>   */
>  if(i < N){
>    i = devrandom; /* save the index/type of the new generator */
>    types[i++] = (gsl_rng_dev_random);
>  }

Sheesh, adding bugs to my own code when I add the "illustration" -- this
should be:

>    devrandom = i; /* save the index/type of the new generator */

> 
> %< Snip snip snip ==================================================================
> 
> Thereafter you should be able to use /dev/random just like any other gsl rng,
> e.g.
>        gsl_rng *random;
>        random = gsl_rng_alloc (types[randnum]);

and this should be

>        random = gsl_rng_alloc (types[devrandom]);

Hopefully there aren't too many other typos...

   rgb

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]