Re: Random number generator without duplicates?
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. |
----------------------------------------------------------------------