|
cds
2.3.2
|
Xor-shift random level generator. More...
#include <cds/intrusive/details/skip_list_base.h>
Public Member Functions | |
| xor_shift () | |
| Initializes the generator instance. | |
| unsigned int | operator() () |
| Main generator function. | |
Static Public Attributes | |
| static unsigned int const | c_nUpperBound = MaxHeight |
The upper bound of generator's return value. The generator produces random number in range [0..c_nUpperBound) | |
Xor-shift random level generator.
The simplest of the generators described in George Marsaglia's "Xorshift RNGs" paper. This is not a high-quality generator but is acceptable for skip-list.
The random generator should return numbers from range [0 .. MaxHeight - 1].
From Doug Lea's ConcurrentSkipListMap.java.