|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: What is the limit of random number that can be selectedby astaines (Curate) |
| on Apr 24, 2004 at 19:41 UTC ( #347879=note: print w/ replies, xml ) | Need Help?? |
|
Few comments - your inner loop could be replaced by a hash look up. Put the number of contigs on each chromosome into a hash indexed by chromosome, and pull the limits of the loop from there. This scales better, and is far easier to extend to other organisms. Also, generating very large random numbers is always difficult. You are very likely to run across machine and architecture specific problems.A simpler solution is to generate two random numbers, one which selects a segment of the database, array or whatever you're getting your stuff from, and a second which selects the specific item. Whether this is what you want depends on your application. Go ask your friendly statistician.
--
Anthony Staines
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||