Logo ROOT  
Reference Guide
ROOT::Math::RanluxppEngine< p > Class Template Referencefinal

template<int p>
class ROOT::Math::RanluxppEngine< p >

Implementation of the RANLUX++ generator.

RANLUX++ is an LCG equivalent of RANLUX using 576 bit numbers.

Described in A. Sibidanov, A revision of the subtract-with-borrow random numbergenerators, Computer Physics Communications*, 221(2017), 299-303, preprint https://arxiv.org/pdf/1705.03123.pdf

The code is loosely based on the Assembly implementation by A. Sibidanov available at https://github.com/sibidanov/ranluxpp/.

Definition at line 27 of file RanluxppEngine.h.

Public Member Functions

 RanluxppEngine (uint64_t seed=314159265)
 
virtual ~RanluxppEngine ()
 
uint64_t IntRndm ()
 Generate a random integer value with 52 bits. More...
 
double operator() ()
 Generate a double-precision random number (non-virtual method) More...
 
double Rndm () override
 Generate a double-precision random number with 52 bits of randomness. More...
 
void SetSeed (uint64_t seed)
 Initialize and seed the state of the generator. More...
 
void Skip (uint64_t n)
 Skip n random numbers without generating them. More...
 
- Public Member Functions inherited from ROOT::Math::TRandomEngine
virtual ~TRandomEngine ()
 

Static Public Member Functions

static const char * Name ()
 Get name of the generator. More...
 

Private Attributes

std::unique_ptr< RanluxppEngineImpl< 52, p > > fImpl
 

#include <Math/RanluxppEngine.h>

Inheritance diagram for ROOT::Math::RanluxppEngine< p >:
[legend]

Constructor & Destructor Documentation

◆ RanluxppEngine()

template<int p>
ROOT::Math::RanluxppEngine< p >::RanluxppEngine ( uint64_t  seed = 314159265)

Definition at line 154 of file RanluxppEngineImpl.cxx.

◆ ~RanluxppEngine()

template<int p>
ROOT::Math::RanluxppEngine< p >::~RanluxppEngine ( )
virtualdefault

Member Function Documentation

◆ IntRndm()

template<int p>
uint64_t ROOT::Math::RanluxppEngine< p >::IntRndm

Generate a random integer value with 52 bits.

Definition at line 187 of file RanluxppEngineImpl.cxx.

◆ Name()

template<int p>
static const char* ROOT::Math::RanluxppEngine< p >::Name ( )
inlinestatic

Get name of the generator.

Definition at line 49 of file RanluxppEngine.h.

◆ operator()()

template<int p>
double ROOT::Math::RanluxppEngine< p >::operator()

Generate a double-precision random number (non-virtual method)

Definition at line 169 of file RanluxppEngineImpl.cxx.

◆ Rndm()

template<int p>
double ROOT::Math::RanluxppEngine< p >::Rndm
overridevirtual

Generate a double-precision random number with 52 bits of randomness.

Implements ROOT::Math::TRandomEngine.

Definition at line 163 of file RanluxppEngineImpl.cxx.

◆ SetSeed()

template<int p>
void ROOT::Math::RanluxppEngine< p >::SetSeed ( uint64_t  seed)

Initialize and seed the state of the generator.

Definition at line 193 of file RanluxppEngineImpl.cxx.

◆ Skip()

template<int p>
void ROOT::Math::RanluxppEngine< p >::Skip ( uint64_t  n)

Skip n random numbers without generating them.

Definition at line 199 of file RanluxppEngineImpl.cxx.

Member Data Documentation

◆ fImpl

template<int p>
std::unique_ptr<RanluxppEngineImpl<52, p> > ROOT::Math::RanluxppEngine< p >::fImpl
private

Definition at line 30 of file RanluxppEngine.h.


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