• 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 without duplicates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random number generator without duplicates?


  • Subject: Re: Random number generator without duplicates?
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 17 Apr 2001 18:27:07 -0700

On 4/17/01 2:56 PM, Chris Espinosa <email@hidden> wrote:

>If you want a guaranteed nonrepeating cycle, you have to shuffle (as
>already mentioned). A shuffling algorithm looks like this:

That's very nice; it's going into my library. To get six random numbers
out of fifty six, you'd call the handler with something like this, right?

items 1 through 6 of create_shuffled_list(56) It really doesn't matter
which six items are used because they're in random order, so the first
six are as good as any.

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: Random number generator without duplicates?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Random number generator without duplicates?
  • Next by Date: Re: getting a URL from IE
  • Previous by thread: Re(2): Random number generator without duplicates? - RANDOM-ISH
  • Next by thread: Re: Random number generator without duplicates?
  • Index(es):
    • Date
    • Thread