• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Random number generator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Random number generator (From: Philippe Mougin <email@hidden>)

  • Prev by Date: Re: Intelligent date squishing
  • Next by Date: Re: Word count and nextWordFromIndex:forward: - not good?
  • Previous by thread: Re: Random number generator
  • Next by thread: saving and restoring an NSTableView's selected row with CoreData
  • Index(es):
    • Date
    • Thread