std.random

yes yes at no.com
Fri Jan 9 20:12:13 PST 2009


How do I use this?
I'd like a fast shuffle of a large array.

void randomShuffle(T, SomeRandomGen)(T[] array, ref SomeRandomGen r);
Shuffles elements of array using r as a shuffler. 

Shuffling a whole array should be faster than taking a random element every time and keeping track of taken elements, right? 


More information about the Digitalmars-d-learn mailing list