Re: Random number generator
Re: Random number generator
- Subject: Re: Random number generator
- From: Marco Scheurer <email@hidden>
- Date: Tue, 9 Aug 2005 00:34:48 +0200
On Aug 8, 2005, at 22:34, Philippe Mougin wrote:
You can do even better (smaller, faster) by removing the need to
generate all possible values:
[...]
// Now we shuffle the result
[...]
Rereading what was asked for and the example of use given makes me
think that what is actually needed is not a random number generator,
but a shuffling algorithm. They are of course well known. The Fisher-
Yates shuffle was described in 1938...
http://www.stanford.edu/~blp/writings/clc/shuffle.html
Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden