Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: A bad shuffle

by bart (Canon)
on Mar 21, 2005 at 09:16 UTC ( #441153=note: print w/ replies, xml ) Need Help??


in reply to Re: A bad shuffle
in thread A bad shuffle

No, you're wrong. It looks like Fisher-Yates, but there's a slight difference, in that all his array items can move again on every loop. His "correct algorithm" is actually Fisher-Yates, where per loop, one item gets moved into its final position.


Comment on Re^2: A bad shuffle
Re^3: A bad shuffle
by Anonymous Monk on Mar 21, 2005 at 14:56 UTC
    Bart,

    That's what I said ;-)

    Please re-read the node you are replying to.

    I said the "original ... is not a Fisher-Yates..." and "The final is a correct Fisher-Yates..." - which is exactly what you are asserting now.

Re^3: A bad shuffle
by Anonymous Monk on Mar 21, 2005 at 15:47 UTC
    Sorry Bart, I thouht you were replying to me...
      No, clearly his remarks were intended for me, not you.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2014-10-01 01:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls