Logo ROOT   6.14/05
Reference Guide
List of all members | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ROOT::Math::GSLQuasiRandomEngine Class Reference

GSLQuasiRandomEngine Base class for all GSL quasi random engines, normally user instantiate the derived classes which creates internally the generator and uses the class ROOT::Math::QuasiRandom.

Definition at line 52 of file GSLQuasiRandom.h.

Public Member Functions

 GSLQuasiRandomEngine ()
 default constructor. More...
 
 GSLQuasiRandomEngine (GSLQRngWrapper *rng)
 create from an existing rng. More...
 
 GSLQuasiRandomEngine (const GSLQuasiRandomEngine &eng)
 Copy constructor : clone the contained GSL generator. More...
 
virtual ~GSLQuasiRandomEngine ()
 call Terminate() More...
 
bool GenerateArray (double *begin, double *end) const
 Generate an array of quasi random numbers The iterators points to the random numbers. More...
 
void Initialize (unsigned int dimension)
 initialize the generator giving the dimension of the sequence If no rng is present the default one based on Mersenne and Twister is created More...
 
std::string Name () const
 return name of generator More...
 
unsigned int NDim () const
 return the dimension of generator More...
 
double operator() () const
 Generate a random number between ]0,1[. More...
 
bool operator() (double *x) const
 Fill array x with random numbers between ]0,1[. More...
 
GSLQuasiRandomEngineoperator= (const GSLQuasiRandomEngine &eng)
 Assignment operator : make a deep copy of the contained GSL generator. More...
 
unsigned int Size () const
 return the state size of generator More...
 
bool Skip (unsigned int n) const
 Skip the next n random numbers. More...
 
void Terminate ()
 delete pointer to contained rng More...
 

Protected Member Functions

void SetType (GSLQRngWrapper *r)
 internal method used by the derived class to set the type of generators More...
 

Private Attributes

GSLQRngWrapperfQRng
 

#include <Math/GSLQuasiRandom.h>

Inheritance diagram for ROOT::Math::GSLQuasiRandomEngine:
[legend]

Constructor & Destructor Documentation

◆ GSLQuasiRandomEngine() [1/3]

ROOT::Math::GSLQuasiRandomEngine::GSLQuasiRandomEngine ( )

default constructor.

No creation of rng is done. If then Initialize() is called an engine is created based on default GSL type (MT)

Definition at line 51 of file GSLQuasiRandom.cxx.

◆ GSLQuasiRandomEngine() [2/3]

ROOT::Math::GSLQuasiRandomEngine::GSLQuasiRandomEngine ( GSLQRngWrapper rng)

create from an existing rng.

User manage the rng pointer which is then deleted olny by calling Terminate()

Definition at line 58 of file GSLQuasiRandom.cxx.

◆ GSLQuasiRandomEngine() [3/3]

ROOT::Math::GSLQuasiRandomEngine::GSLQuasiRandomEngine ( const GSLQuasiRandomEngine eng)

Copy constructor : clone the contained GSL generator.

Definition at line 63 of file GSLQuasiRandom.cxx.

◆ ~GSLQuasiRandomEngine()

ROOT::Math::GSLQuasiRandomEngine::~GSLQuasiRandomEngine ( )
virtual

call Terminate()

Definition at line 67 of file GSLQuasiRandom.cxx.

Member Function Documentation

◆ GenerateArray()

bool ROOT::Math::GSLQuasiRandomEngine::GenerateArray ( double *  begin,
double *  end 
) const

Generate an array of quasi random numbers The iterators points to the random numbers.

Definition at line 126 of file GSLQuasiRandom.cxx.

◆ Initialize()

void ROOT::Math::GSLQuasiRandomEngine::Initialize ( unsigned int  dimension)

initialize the generator giving the dimension of the sequence If no rng is present the default one based on Mersenne and Twister is created

Definition at line 83 of file GSLQuasiRandom.cxx.

◆ Name()

std::string ROOT::Math::GSLQuasiRandomEngine::Name ( ) const

return name of generator

Definition at line 137 of file GSLQuasiRandom.cxx.

◆ NDim()

unsigned int ROOT::Math::GSLQuasiRandomEngine::NDim ( ) const

return the dimension of generator

Definition at line 154 of file GSLQuasiRandom.cxx.

◆ operator()() [1/2]

double ROOT::Math::GSLQuasiRandomEngine::operator() ( ) const

Generate a random number between ]0,1[.

Definition at line 99 of file GSLQuasiRandom.cxx.

◆ operator()() [2/2]

bool ROOT::Math::GSLQuasiRandomEngine::operator() ( double *  x) const

Fill array x with random numbers between ]0,1[.

Definition at line 109 of file GSLQuasiRandom.cxx.

◆ operator=()

GSLQuasiRandomEngine & ROOT::Math::GSLQuasiRandomEngine::operator= ( const GSLQuasiRandomEngine eng)

Assignment operator : make a deep copy of the contained GSL generator.

Definition at line 73 of file GSLQuasiRandom.cxx.

◆ SetType()

void ROOT::Math::GSLQuasiRandomEngine::SetType ( GSLQRngWrapper r)
inlineprotected

internal method used by the derived class to set the type of generators

Definition at line 136 of file GSLQuasiRandom.h.

◆ Size()

unsigned int ROOT::Math::GSLQuasiRandomEngine::Size ( ) const

return the state size of generator

Definition at line 147 of file GSLQuasiRandom.cxx.

◆ Skip()

bool ROOT::Math::GSLQuasiRandomEngine::Skip ( unsigned int  n) const

Skip the next n random numbers.

Definition at line 116 of file GSLQuasiRandom.cxx.

◆ Terminate()

void ROOT::Math::GSLQuasiRandomEngine::Terminate ( void  )

delete pointer to contained rng

Definition at line 90 of file GSLQuasiRandom.cxx.

Member Data Documentation

◆ fQRng

GSLQRngWrapper* ROOT::Math::GSLQuasiRandomEngine::fQRng
private

Definition at line 142 of file GSLQuasiRandom.h.

Libraries for ROOT::Math::GSLQuasiRandomEngine:
[legend]

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