Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::GSLRngROOTWrapper< Engine > Struct Template Reference

template<class Engine>
struct ROOT::Math::GSLRngROOTWrapper< Engine >

class for wrapping ROOT Engines in gsl_rng types which can be used as extra GSL random number generators For this we need to implement functions which will be called by gsl_rng.

The functions (Seed, Rndm, IntRndm) are passed in the gsl_rng_type and used to build a gsl_rng object. When gsl_rng is alloacated, only the memory state is allocated using calloc(1,size), which gives a memory block of the given bytes and it initializes to zero. Therefore no constructor of GSLRngROOTWrapper can be called and also we cannot call non-static member function of the class. The underlined ROOT engine is then built and deleted using the functions CreateEngine() and FreeEngine(), called by the specific GSLRandomEngine class that instantiates for the the generator (e.g. GSLRngMixMax)

Definition at line 39 of file GSLRngROOTWrapper.h.

Static Public Member Functions

static void CreateEngine (gsl_rng *r)
 
static void FreeEngine (gsl_rng *r)
 
static unsigned long IntRndm (void *p)
 
static unsigned long Max ()
 
static unsigned long Min ()
 
static std::string Name ()
 
static double Rndm (void *p)
 
static void Seed (void *p, unsigned long seed)
 
static size_t Size ()
 

Public Attributes

Engine * fEngine = nullptr
 

#include </home/sftnight/build/workspace/root-makedoc-v630/rootspi/rdoc/src/v6-30-00-patches/math/mathmore/src/GSLRngROOTWrapper.h>

Member Function Documentation

◆ CreateEngine()

template<class Engine >
static void ROOT::Math::GSLRngROOTWrapper< Engine >::CreateEngine ( gsl_rng *  r)
inlinestatic

Definition at line 46 of file GSLRngROOTWrapper.h.

◆ FreeEngine()

template<class Engine >
static void ROOT::Math::GSLRngROOTWrapper< Engine >::FreeEngine ( gsl_rng *  r)
inlinestatic

Definition at line 71 of file GSLRngROOTWrapper.h.

◆ IntRndm()

template<class Engine >
static unsigned long ROOT::Math::GSLRngROOTWrapper< Engine >::IntRndm ( void *  p)
inlinestatic

Definition at line 57 of file GSLRngROOTWrapper.h.

◆ Max()

template<class Engine >
static unsigned long ROOT::Math::GSLRngROOTWrapper< Engine >::Max ( )
inlinestatic

Definition at line 79 of file GSLRngROOTWrapper.h.

◆ Min()

template<class Engine >
static unsigned long ROOT::Math::GSLRngROOTWrapper< Engine >::Min ( )
inlinestatic

Definition at line 80 of file GSLRngROOTWrapper.h.

◆ Name()

template<class Engine >
static std::string ROOT::Math::GSLRngROOTWrapper< Engine >::Name ( )
inlinestatic

Definition at line 82 of file GSLRngROOTWrapper.h.

◆ Rndm()

template<class Engine >
static double ROOT::Math::GSLRngROOTWrapper< Engine >::Rndm ( void *  p)
inlinestatic

Definition at line 56 of file GSLRngROOTWrapper.h.

◆ Seed()

template<class Engine >
static void ROOT::Math::GSLRngROOTWrapper< Engine >::Seed ( void *  p,
unsigned long  seed 
)
inlinestatic

Definition at line 59 of file GSLRngROOTWrapper.h.

◆ Size()

template<class Engine >
static size_t ROOT::Math::GSLRngROOTWrapper< Engine >::Size ( )
inlinestatic

Definition at line 81 of file GSLRngROOTWrapper.h.

Member Data Documentation

◆ fEngine

template<class Engine >
Engine* ROOT::Math::GSLRngROOTWrapper< Engine >::fEngine = nullptr

Definition at line 41 of file GSLRngROOTWrapper.h.

Collaboration diagram for ROOT::Math::GSLRngROOTWrapper< Engine >:
[legend]

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