Logo ROOT  
Reference Guide
ROOT::Math::QuasiRandom< Engine > Class Template Reference

template<class Engine>
class ROOT::Math::QuasiRandom< Engine >

User class for MathMore random numbers template on the Engine type.

The API of this class followed that of the class ROOT::Math::Random It must be implemented using as Engine one of the derived classes of ROOT::Math::GSLQuasiRandomEngine, like ROOT::Math::GSLQrngSobol

Definition at line 60 of file QuasiRandom.h.

Public Member Functions

 QuasiRandom (const Engine &e, unsigned int dimension=1)
 Create a QuasiRandom generator based on a provided generic engine. More...
 
 QuasiRandom (unsigned int dimension=1)
 Create a QuasiRandom generator. More...
 
 ~QuasiRandom ()
 Destructor: call Terminate() function of engine to free any allocated resource. More...
 
unsigned int EngineSize () const
 Return the size of the generator state. More...
 
std::string Name () const
 Return the name of the generator. More...
 
unsigned int NDim () const
 Return the dimension of the generator. More...
 
double Next ()
 Generate next quasi random numbers point (1 - dimension) More...
 
bool Next (double *x)
 Generate next quasi random numbers points. More...
 
double Rndm ()
 Generate quasi random numbers between ]0,1[ 0 and 1 are excluded Function to be compatible with ROOT TRandom compatibility. More...
 
bool RndmArray (int n, double *array)
 Generate an array of random numbers between ]0,1[ Function to preserve ROOT Trandom compatibility The array will be filled as x1,y1,z1,....x2,y2,z2,... More...
 
bool Skip (unsigned int n)
 skip the next n number and jumb directly to the current state + n More...
 
std::string Type () const
 Return the type (name) of the used generator. More...
 

Private Attributes

Engine fEngine
 

#include <Math/QuasiRandom.h>

Constructor & Destructor Documentation

◆ QuasiRandom() [1/2]

template<class Engine >
ROOT::Math::QuasiRandom< Engine >::QuasiRandom ( unsigned int  dimension = 1)
inline

Create a QuasiRandom generator.

Use default engine constructor. Engine will be initialized via Initialize() function in order to allocate resources

Definition at line 70 of file QuasiRandom.h.

◆ QuasiRandom() [2/2]

template<class Engine >
ROOT::Math::QuasiRandom< Engine >::QuasiRandom ( const Engine &  e,
unsigned int  dimension = 1 
)
inlineexplicit

Create a QuasiRandom generator based on a provided generic engine.

Engine will be initialized via Initialize() function in order to allocate resources

Definition at line 80 of file QuasiRandom.h.

◆ ~QuasiRandom()

template<class Engine >
ROOT::Math::QuasiRandom< Engine >::~QuasiRandom ( )
inline

Destructor: call Terminate() function of engine to free any allocated resource.

Definition at line 88 of file QuasiRandom.h.

Member Function Documentation

◆ EngineSize()

template<class Engine >
unsigned int ROOT::Math::QuasiRandom< Engine >::EngineSize ( ) const
inline

Return the size of the generator state.

Definition at line 140 of file QuasiRandom.h.

◆ Name()

template<class Engine >
std::string ROOT::Math::QuasiRandom< Engine >::Name ( ) const
inline

Return the name of the generator.

Definition at line 154 of file QuasiRandom.h.

◆ NDim()

template<class Engine >
unsigned int ROOT::Math::QuasiRandom< Engine >::NDim ( ) const
inline

Return the dimension of the generator.

Definition at line 147 of file QuasiRandom.h.

◆ Next() [1/2]

template<class Engine >
double ROOT::Math::QuasiRandom< Engine >::Next ( )
inline

Generate next quasi random numbers point (1 - dimension)

Definition at line 102 of file QuasiRandom.h.

◆ Next() [2/2]

template<class Engine >
bool ROOT::Math::QuasiRandom< Engine >::Next ( double x)
inline

Generate next quasi random numbers points.

Definition at line 95 of file QuasiRandom.h.

◆ Rndm()

template<class Engine >
double ROOT::Math::QuasiRandom< Engine >::Rndm ( )
inline

Generate quasi random numbers between ]0,1[ 0 and 1 are excluded Function to be compatible with ROOT TRandom compatibility.

Definition at line 111 of file QuasiRandom.h.

◆ RndmArray()

template<class Engine >
bool ROOT::Math::QuasiRandom< Engine >::RndmArray ( int  n,
double array 
)
inline

Generate an array of random numbers between ]0,1[ Function to preserve ROOT Trandom compatibility The array will be filled as x1,y1,z1,....x2,y2,z2,...

Definition at line 126 of file QuasiRandom.h.

◆ Skip()

template<class Engine >
bool ROOT::Math::QuasiRandom< Engine >::Skip ( unsigned int  n)
inline

skip the next n number and jumb directly to the current state + n

Definition at line 118 of file QuasiRandom.h.

◆ Type()

template<class Engine >
std::string ROOT::Math::QuasiRandom< Engine >::Type ( ) const
inline

Return the type (name) of the used generator.

Definition at line 133 of file QuasiRandom.h.

Member Data Documentation

◆ fEngine

template<class Engine >
Engine ROOT::Math::QuasiRandom< Engine >::fEngine
private

Definition at line 160 of file QuasiRandom.h.


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