in reply to Re: Re: Selecting random records from an array
in thread Selecting random records from an array
... the results are not well- defined.
Isn't that exactly why it works (for some definition of the term:)? The whole point of making a random selection is to achieve a "not-well defined" result?
That said, this 'desort' method of shuffling an array doesn't stand up to analysis for another reason. Statistically, the results are extremely biased as I showed here. Note the abysmal standard deviation of this method (labelled 'qsort', as it was done under 5.6).
Might be interesting to see what sort[sic] of results you would get using the default mergesort in 5.8.
|
---|