[ENH] raok-Shuffling
ok at cs.otago.ac.nz
ok at cs.otago.ac.nz
Thu Jun 6 03:27:58 UTC 2002
from preamble:
"Change Set: raok-Shuffling
Date: 6 June 2002
Author: Richard A. O'Keefe
While developing a randomisation based algorithm, I found a use for
scrambling
an array in-place. It would have been perfectly possible to use array
shuffled
and keep on creating new copies all the time, but there was no POINT in
doing so.
This change-set adds a 'rearranging' category to SequenceableCollection,
moves
#swap:with: to it, and #shuffle and #shuffleBy:. There should be a
reverse in
place operation in this category, and #reverse is the obvious name for
it, but that
is taken, unhappily. If anyone ever wants to rotate sequences, this is
the category
for such methods. Also partial permutation, ..."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raok-Shuffling.cs.gz
Type: application/octet-stream
Size: 703 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020606/666fe91b/raok-Shuffling.cs.obj
More information about the Squeak-dev
mailing list
|