#include <RandomGenerators.hpp>
Public Member Functions | |
void | jump () |
uint64_t | operator() () |
void | seed (uint64_t seed) |
XorShift128Plus (const XorShift128Plus &gen) | |
XorShift128Plus (XorShift128Plus &&gen) | |
XorShift128Plus (uint64_t seed) | |
XorShift128Plus () | |
Static Public Member Functions | |
static constexpr result_type | max () |
static constexpr result_type | min () |
Private Attributes | |
uint64_t | s [2] |
This is the fastest generator passing BigCrush without systematic failures, but due to the relatively short period it is acceptable only for applications with a mild amount of parallelism; otherwise, use a xorshift1024* generator.
The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a splitmix64 generator and use its output to fill s.
Definition at line 62 of file RandomGenerators.hpp.
ApproxMVBB::RandomGenerators::XorShift128Plus::XorShift128Plus | ( | uint64_t | seed | ) | [inline] |
Definition at line 204 of file RandomGenerators.hpp.
Take time() to seed this generator
Definition at line 209 of file RandomGenerators.hpp.
void ApproxMVBB::RandomGenerators::XorShift128Plus::jump | ( | ) | [inline] |
This is the jump function for the generator. It is equivalent to 2^64 calls to next(); it can be used to generate 2^64 non-overlapping subsequences for parallel computations.
Definition at line 230 of file RandomGenerators.hpp.
static constexpr result_type ApproxMVBB::RandomGenerators::XorShift128Plus::max | ( | ) | [inline, static] |
Definition at line 86 of file RandomGenerators.hpp.
static constexpr result_type ApproxMVBB::RandomGenerators::XorShift128Plus::min | ( | ) | [inline, static] |
Definition at line 85 of file RandomGenerators.hpp.
uint64_t ApproxMVBB::RandomGenerators::XorShift128Plus::operator() | ( | ) | [inline] |
Generate random number
Definition at line 219 of file RandomGenerators.hpp.
void ApproxMVBB::RandomGenerators::XorShift128Plus::seed | ( | uint64_t | seed | ) | [inline] |
Definition at line 213 of file RandomGenerators.hpp.
uint64_t ApproxMVBB::RandomGenerators::XorShift128Plus::s[2] [private] |
Definition at line 64 of file RandomGenerators.hpp.