Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
XoShiRo256PlusPlus Class Reference

A random number generator as proposed here https://prng.di.unimi.it/xoshiro256plusplus.c. More...

#include <RandHelper.h>

Public Member Functions

void discard (unsigned long long skip)
uint64_t operator() ()
void seed (const uint64_t seed)

Static Private Member Functions

static uint64_t rotl64 (const uint64_t x, const int k)
static uint64_t splitmix64 (const uint64_t seed)

Private Attributes

uint64_t state [4]

Friends

std::ostream & operator<< (std::ostream &os, const XoShiRo256PlusPlus &r)
std::istream & operator>> (std::istream &is, XoShiRo256PlusPlus &r)

Detailed Description

A random number generator as proposed here https://prng.di.unimi.it/xoshiro256plusplus.c.

Definition at line 49 of file RandHelper.h.

Member Function Documentation

◆ discard()

void XoShiRo256PlusPlus::discard ( unsigned long long skip)
inline

Definition at line 70 of file RandHelper.h.

◆ operator()()

uint64_t XoShiRo256PlusPlus::operator() ( )
inline

Definition at line 58 of file RandHelper.h.

References rotl64(), and state.

◆ rotl64()

uint64_t XoShiRo256PlusPlus::rotl64 ( const uint64_t x,
const int k )
inlinestaticprivate

Definition at line 88 of file RandHelper.h.

Referenced by operator()().

Here is the caller graph for this function:

◆ seed()

void XoShiRo256PlusPlus::seed ( const uint64_t seed)
inline

Definition at line 51 of file RandHelper.h.

References seed(), splitmix64(), and state.

Referenced by seed(), and splitmix64().

Here is the caller graph for this function:

◆ splitmix64()

uint64_t XoShiRo256PlusPlus::splitmix64 ( const uint64_t seed)
inlinestaticprivate

Definition at line 92 of file RandHelper.h.

References seed().

Referenced by seed().

Here is the caller graph for this function:

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const XoShiRo256PlusPlus & r )
friend

Definition at line 76 of file RandHelper.h.

References state.

◆ operator>>

std::istream & operator>> ( std::istream & is,
XoShiRo256PlusPlus & r )
friend

Definition at line 81 of file RandHelper.h.

References state.

Field Documentation

◆ state

uint64_t XoShiRo256PlusPlus::state[4]
private

Definition at line 99 of file RandHelper.h.

Referenced by operator()(), operator<<, operator>>, and seed().


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