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. | |
GSLQuasiRandomEngine (const GSLQuasiRandomEngine &eng) | |
Copy constructor : clone the contained GSL generator. | |
GSLQuasiRandomEngine (GSLQRngWrapper *rng) | |
create from an existing rng. | |
virtual | ~GSLQuasiRandomEngine () |
call Terminate() | |
bool | GenerateArray (double *begin, double *end) const |
Generate an array of quasi random numbers The iterators points to the random numbers. | |
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 | |
std::string | Name () const |
return name of generator | |
unsigned int | NDim () const |
return the dimension of generator | |
double | operator() () const |
Generate a random number between ]0,1[. | |
bool | operator() (double *x) const |
Fill array x with random numbers between ]0,1[. | |
GSLQuasiRandomEngine & | operator= (const GSLQuasiRandomEngine &eng) |
Assignment operator : make a deep copy of the contained GSL generator. | |
unsigned int | Size () const |
return the state size of generator | |
bool | Skip (unsigned int n) const |
Skip the next n random numbers. | |
void | Terminate () |
delete pointer to contained rng | |
Protected Member Functions | |
void | SetType (GSLQRngWrapper *r) |
internal method used by the derived class to set the type of generators | |
Private Attributes | |
GSLQRngWrapper * | fQRng |
#include <Math/GSLQuasiRandom.h>
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 49 of file GSLQuasiRandom.cxx.
ROOT::Math::GSLQuasiRandomEngine::GSLQuasiRandomEngine | ( | GSLQRngWrapper * | rng | ) |
create from an existing rng.
User manage the rng pointer which is then deleted only by calling Terminate()
Definition at line 56 of file GSLQuasiRandom.cxx.
ROOT::Math::GSLQuasiRandomEngine::GSLQuasiRandomEngine | ( | const GSLQuasiRandomEngine & | eng | ) |
Copy constructor : clone the contained GSL generator.
Definition at line 61 of file GSLQuasiRandom.cxx.
|
virtual |
call Terminate()
Definition at line 65 of file GSLQuasiRandom.cxx.
Generate an array of quasi random numbers The iterators points to the random numbers.
Definition at line 124 of file GSLQuasiRandom.cxx.
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 81 of file GSLQuasiRandom.cxx.
std::string ROOT::Math::GSLQuasiRandomEngine::Name | ( | ) | const |
return name of generator
Definition at line 135 of file GSLQuasiRandom.cxx.
unsigned int ROOT::Math::GSLQuasiRandomEngine::NDim | ( | ) | const |
return the dimension of generator
Definition at line 152 of file GSLQuasiRandom.cxx.
double ROOT::Math::GSLQuasiRandomEngine::operator() | ( | ) | const |
Generate a random number between ]0,1[.
Definition at line 97 of file GSLQuasiRandom.cxx.
Fill array x with random numbers between ]0,1[.
Definition at line 107 of file GSLQuasiRandom.cxx.
GSLQuasiRandomEngine & ROOT::Math::GSLQuasiRandomEngine::operator= | ( | const GSLQuasiRandomEngine & | eng | ) |
Assignment operator : make a deep copy of the contained GSL generator.
Definition at line 71 of file GSLQuasiRandom.cxx.
|
inlineprotected |
internal method used by the derived class to set the type of generators
Definition at line 136 of file GSLQuasiRandom.h.
unsigned int ROOT::Math::GSLQuasiRandomEngine::Size | ( | ) | const |
return the state size of generator
Definition at line 145 of file GSLQuasiRandom.cxx.
Skip the next n random numbers.
Definition at line 114 of file GSLQuasiRandom.cxx.
void ROOT::Math::GSLQuasiRandomEngine::Terminate | ( | ) |
delete pointer to contained rng
Definition at line 88 of file GSLQuasiRandom.cxx.
|
private |
Definition at line 142 of file GSLQuasiRandom.h.