cds  2.3.2
cds::intrusive::skip_list::xor_shift< MaxHeight > Class Template Reference

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)
 

Detailed Description

template<unsigned MaxHeight>
class cds::intrusive::skip_list::xor_shift< MaxHeight >

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.


The documentation for this class was generated from the following file:

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:47 by Doxygen 1.8.13