in reply to randomly choosing elements from an array
Introduce a level of indirection. Instead of picking from the list, pick from a set of indices into the list. Randomize the set of indices, and pick the first X.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: randomly choosing elements from an array
by sulfericacid (Deacon) on Mar 19, 2003 at 06:05 UTC | |
by pg (Canon) on Mar 19, 2003 at 06:25 UTC | |
by sulfericacid (Deacon) on Mar 19, 2003 at 16:02 UTC | |
by dws (Chancellor) on Mar 19, 2003 at 11:15 UTC |