Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Prima facie, the code looks right. Not sure you need to shuffle 10 times over, but why not? But you haven't really said what you aim is. The shuffle function of the List::Util module is supposed to return the input values in a random order. If your random order is not the same as the one in published sources, this is good news, isn't it? If you obtained the same result, then this would be a strong indication that the random function is not right.

Or, said in other words, if your random output is not the same as the random output of someone else, then it tends to confirm that this is really random (or, at least, that there is no proof that it is misbehaving). But the fact that your random output is different from someone else random output does not mean that your result is any better or worse than someone else's result.

I think you need to explain more what you are trying to do.

Or did I entirely miss your point? I am not a biologist and my knowledge of genetics essentially dates back from the mid-1970s, so a very long time ago both in terms of what I remember about it and in terms of the progresses made in between.

Then, there is the question of whether the (pseudo-)random order provided by shuffle is good enough to suit your purposes. This is a very difficult question and, besides the fact that I do not know your purposes, I just don't know how good shuffle is. Donald Knuth's The Art of of Computer Programming, Vol. 2, has almost 200 pages on random numbers generation, I think that this shows that this is a rather difficult problem.


In reply to Re: Random shuffling by Laurent_R
in thread Random shuffling by onlyIDleft

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found