Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: need some Ruby magic
Martin DeMello
12/7/2005 8:24:00 PM
Stephen Waits <steve@waits.net> wrote:
>
>
> This is really just meant to be a simple hack. I think a better
> algorithm could assign a random index to each element, then sort on
> those indices.
http://www.rubygarden.org/ruby?Ar...
is a variant of your code,
with a nice proof that it's unbiased.
http://c2.com/cgi/wiki?Lin...
has a lot of discussion on
shuffling algorithms.
martin
1 Answer
Stephen Waits
12/7/2005 9:16:00 PM
0
Martin DeMello wrote:
>
http://www.rubygarden.org/ruby?Ar...
is a variant of your code,
> with a nice proof that it's unbiased.
>
>
http://c2.com/cgi/wiki?Lin...
has a lot of discussion on
> shuffling algorithms.
Thanks Martin!
--Steve
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: need some Ruby magic
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password