| 122 | |
| 123 | /// randomly shuffle the specified array, resulting permutation is uniformly distributed |
| 124 | template <class T> void Shuffle(RandomNumberGenerator &rng, T *array, unsigned int size) |
| 125 | { |
| 126 | while (--size) |
| 127 | swap(array[size], array[(unsigned int)rng.GetLong(0, size)]); |
| 128 | } |
| 129 | |
| 130 | /// abstract base class for hash functions |
| 131 | /** HashModule objects are stateful. They are created in an initial state, |