Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Re: help in understanding the standard array shuffle

by arhuman (Vicar)
on Feb 14, 2001 at 19:21 UTC ( [id://58355]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: help in understanding the standard array shuffle
in thread help in understanding the standard array shuffle

It would seem this shuffle guarantees that no element remains in it's current position. This seems less than random.

My tests show that SOME elements stay in place !
Did I miss something ?

Note: I suspect however that the distribution is not perfect(the items "don't move too far from their position" so i suspect the "distribution" to be biased)...

Anyway it's ok for me the way it is, just have to remember it's not a true 'statistical random' change...
  • Comment on Re: Re: Re: help in understanding the standard array shuffle

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://58355]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found