Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
df042_ThreadSafeRNG.hxx File Reference
#include <random>
Include dependency graph for df042_ThreadSafeRNG.hxx:

Functions

double GetNormallyDistributedNumberFromGlobalGenerator ()
 
double GetNormallyDistributedNumberPerSlotGenerator (unsigned int slot)
 
double GetNormallyDistributedNumberPerSlotGeneratorForEntry (unsigned int slot, unsigned long long entry)
 
std::normal_distribution< doubleglobalGaus (0., 1.)
 
std::mt19937 globalGenerator (globalRandomDevice())
 
void ReinitializeGenerators (unsigned int nSlots)
 

Variables

std::vector< std::normal_distribution< double > > gaussians
 
std::vector< std::mt19937generators
 
std::random_device globalRandomDevice {}
 

Function Documentation

◆ GetNormallyDistributedNumberFromGlobalGenerator()

double GetNormallyDistributedNumberFromGlobalGenerator ( )

Definition at line 12 of file df042_ThreadSafeRNG.hxx.

◆ GetNormallyDistributedNumberPerSlotGenerator()

double GetNormallyDistributedNumberPerSlotGenerator ( unsigned int slot)

Definition at line 32 of file df042_ThreadSafeRNG.hxx.

◆ GetNormallyDistributedNumberPerSlotGeneratorForEntry()

double GetNormallyDistributedNumberPerSlotGeneratorForEntry ( unsigned int slot,
unsigned long long entry )

Definition at line 37 of file df042_ThreadSafeRNG.hxx.

◆ globalGaus()

std::normal_distribution< double > globalGaus ( 0. ,
1.  )
inline

◆ globalGenerator()

std::mt19937 globalGenerator ( globalRandomDevice() )
inline

◆ ReinitializeGenerators()

void ReinitializeGenerators ( unsigned int nSlots)

Definition at line 23 of file df042_ThreadSafeRNG.hxx.

Variable Documentation

◆ gaussians

std::vector<std::normal_distribution<double> > gaussians
inline

Definition at line 21 of file df042_ThreadSafeRNG.hxx.

◆ generators

std::vector<std::mt19937> generators
inline

Definition at line 20 of file df042_ThreadSafeRNG.hxx.

◆ globalRandomDevice

std::random_device globalRandomDevice {}
inline

Definition at line 8 of file df042_ThreadSafeRNG.hxx.