Random numbers generation
Hi everyone! I don't know if this is the best place to ask this, so if it is Off Topic, please tell me. I did this code (which comes from an example in the gsl doc): void CicloContagio(Control ctrlCopiaExterno, Nodo nodoContagiado, QListNodo listaProximo ) { const gsl_rng_type * T; gsl_rng * r; /* create a generator chosen by the environment variable GSL_RNG_TYPE */ gsl_rng_env_setup(); T = gsl_rng_default; r = gsl_rng_alloc (T); for (int i = 0; i 3; i++) { double k = gsl_ran_flat (r,0,1); cout k \n\n; //more code... } } It compiles fine, but there's a little detail. Every time I run the program, I get the same results, which is not what I want. Reading futher in the documentation: The variates depend on the seed used by the generator. The seed for the default generator type gsl_rng_default can be changed with the GSL_RNG_SEED environment variable to produce a different stream of variates, $ GSL_RNG_SEED=123 ./a.out ¿Is there any way of making differents results without having to change the seed from the outside? Cheers, Damian.- -- Anyone who says he can see through women is missing a lot. -- Groucho Marx
Re: Random numbers generation
¿Is there any way of making differents results without having to change the seed from the outside? Hi Lisandro. setenv(3) ? Regards. -- Homepage : http://geocities.com/arhuaco The first principle is that you must not fool yourself and you are the easiest person to fool. -- Richard Feynman.
Re: Random numbers generation
Lisandro Damian Nicanor Perez Meyer [EMAIL PROTECTED] writes: ¿Is there any way of making differents results without having to change the seed from the outside? It looks like you can also call gsl_rng_set(r, some_seed); or assign directly to gsl_rng_default_seed, at least with the version of gsl available in sid (unstable). -- Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org) Finger [EMAIL PROTECTED] (NOT a valid e-mail address) for more info. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Random numbers generation
El Mié 07 Dic 2005 15:06, David Dooling escribió: On 12/7/05, Aaron M. Ucko [EMAIL PROTECTED] wrote: Lisandro Damian Nicanor Perez Meyer [EMAIL PROTECTED] writes: ¿Is there any way of making differents results without having to change the seed from the outside? It looks like you can also call gsl_rng_set(r, some_seed); or assign directly to gsl_rng_default_seed, at least with the version of gsl available in sid (unstable). I have found the best approach is to have a default seed (probably the default that GSL uses) and allow the setting of an alternative seed via a command-line option or input file (using one of the above methods). You do not want the seed to be ``random'', as that makes bugs difficult to find. You want your output to be deterministic, even when using random numbers. dd -- David Dooling Well, thank you everyone! You're incredible! Cheers, Damian.- -- I was married by a judge. I should have asked for a jury. -- Groucho Marx
Re: Genetics Program
On 7 December 2005 at 17:07, Christopher David Desjardins wrote: | Hi- | I am MSc student at the University of Alberta studying ecology. | Recently I've decide to dive into population genetics and I am curious | if there are any good genetics programs available for linux and debian | in particular? There's a ton in Debian in general: [EMAIL PROTECTED]:~ apt-cache search bio | wc -l 186 [EMAIL PROTECTED]:~ apt-cache search genetic | wc -l 32 More generally, one place that has a few overview review article is the Genome Canada / Canadian BioInformatics Help Desk Newsletter hosted at your very own U of Alberta. Bela Tiware has on overview of live distros here: http://gchelpdesk.ualberta.ca/news/03mar05/cbhd_news_03mar05.php#GearingUp and Bela and I have an article about my Quantian distro here: http://gchelpdesk.ualberta.ca/news/30jun05/cbhd_news_30jun05.php#Quantian The next Quantian release will have once again a large selection of tools incl a complete set of BioConductor packages (that part is not in Debian) but dozens of packages from Debian from the BioPython, BioPerl, BioAnything area such as bioperl python-biopython blast2 clustalw clustalx seaview hmmer and more. Hope this helps, Dirk -- Statistics: The (futile) attempt to offer certainty about uncertainty. -- Roger Koenker, 'Dictionary of Received Ideas of Statistics' -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Genetics Program
On Wed, 7 Dec 2005, Dirk Eddelbuettel wrote: The next Quantian release will have once again a large selection of tools incl a complete set of BioConductor packages (that part is not in Debian) but What BioConductor version are you using? The BioConductor movement to official Debian is a little bit stalled. Matt Hope has an ITP, inofficial packages of an old version and no time to respond to any question. I would love if we could get this beast into Debian but have no time to care for it personally. Other people who claimed to have interest and wanted to do work on an alioth project I have started seemed to have lost interest. Kind regards Andreas. -- http://fam-tille.de -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]