swarm.collections
Interface ListShufflerC
- public abstract interface ListShufflerC
- extends CreateS, CreateC, DropS, DropC
A class to randomize the order of a given Swarm List.
ListShuffler randomizes the order of the elements in a List; either the whole list or the num lowest elements. The list must be supplied. An uniform distribution can be supplied, or the system- supplied uniformUnsRand is used. The algorithm is from Knuth. All these methods modify the underlying collection, so any indexes should always be regenerated.
setUniformRandom
public Object setUniformRandom(Object dist)
- the setUniformRandom: method connects the supplied uniform distribution to the Shuffler (run after createBegin:).
createEnd
public Object createEnd()
- Specified by:
- createEnd in interface CreateC