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 47 of file RandHelper.h.

Member Function Documentation

◆ discard()

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

Definition at line 68 of file RandHelper.h.

◆ operator()()

uint64_t XoShiRo256PlusPlus::operator() ( )
inline

Definition at line 56 of file RandHelper.h.

References rotl64(), and state.

◆ rotl64()

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

Definition at line 86 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 49 of file RandHelper.h.

References splitmix64(), and state.

Referenced by splitmix64().

Here is the caller graph for this function:

◆ splitmix64()

static uint64_t XoShiRo256PlusPlus::splitmix64 ( const uint64_t  seed)
inlinestaticprivate

Definition at line 90 of file RandHelper.h.

References seed().

Referenced by seed().

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 74 of file RandHelper.h.

◆ operator>>

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

Definition at line 79 of file RandHelper.h.

Field Documentation

◆ state

uint64_t XoShiRo256PlusPlus::state[4]
private

Definition at line 97 of file RandHelper.h.

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


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