ROOT 6.12/07 Reference Guide |
This class generates the quasi-random (aka "low discrepancy") sequence for dimensions up to 12 using the Niederreiter base 2 algorithm described in Bratley, Fox, Niederreiter, ACM Trans.
Model. Comp. Sim. 2, 195 (1992). This implementation was adapted from the 0.9 beta release of the GNU scientific library. Quasi-random number sequences are useful for improving the convergence of a Monte Carlo integration.
Definition at line 21 of file RooQuasiRandomGenerator.h.
Public Types | |
enum | { MaxDimension = 12, NBits = 31, MaxDegree = 50, MaxPrimitiveDegree = 5 } |
Public Member Functions | |
RooQuasiRandomGenerator () | |
Perform one-time initialization of our static coefficient array if necessary and initialize our workspace. More... | |
virtual | ~RooQuasiRandomGenerator () |
Destructor. More... | |
Bool_t | generate (UInt_t dimension, Double_t vector[]) |
Generate the next number in the sequence for the specified dimension. More... | |
void | reset () |
Reset the workspace to its initial state. More... | |
Protected Member Functions | |
Int_t | add (Int_t x, Int_t y) const |
void | calculateCoefs (UInt_t dimension) |
Calculate the coefficients for the given number of dimensions. More... | |
void | calculateV (const int px[], int px_degree, int pb[], int *pb_degree, int v[], int maxv) |
Internal function. More... | |
Int_t | mul (Int_t x, Int_t y) const |
void | polyMultiply (const int pa[], int pa_degree, const int pb[], int pb_degree, int pc[], int *pc_degree) |
Internal function. More... | |
Int_t | sub (Int_t x, Int_t y) const |
Private Attributes | |
Int_t * | _nextq |
Int_t | _sequenceCount |
Static Private Attributes | |
static Int_t | _cj [NBits][MaxDimension] |
static Bool_t | _coefsCalculated = kFALSE |
static const Int_t | _polyDegree [MaxDimension+1] |
static const Int_t | _primitivePoly [MaxDimension+1][MaxPrimitiveDegree+1] |
#include <RooQuasiRandomGenerator.h>
anonymous enum |
Enumerator | |
---|---|
MaxDimension | |
NBits | |
MaxDegree | |
MaxPrimitiveDegree |
Definition at line 27 of file RooQuasiRandomGenerator.h.
RooQuasiRandomGenerator::RooQuasiRandomGenerator | ( | ) |
Perform one-time initialization of our static coefficient array if necessary and initialize our workspace.
Definition at line 52 of file RooQuasiRandomGenerator.cxx.
|
virtual |
Destructor.
Definition at line 67 of file RooQuasiRandomGenerator.cxx.
Definition at line 35 of file RooQuasiRandomGenerator.h.
Calculate the coefficients for the given number of dimensions.
Definition at line 127 of file RooQuasiRandomGenerator.cxx.
|
protected |
Internal function.
Definition at line 205 of file RooQuasiRandomGenerator.cxx.
Generate the next number in the sequence for the specified dimension.
The maximum dimension supported is 12.
Definition at line 87 of file RooQuasiRandomGenerator.cxx.
Definition at line 36 of file RooQuasiRandomGenerator.h.
|
protected |
Internal function.
Definition at line 297 of file RooQuasiRandomGenerator.cxx.
void RooQuasiRandomGenerator::reset | ( | ) |
Reset the workspace to its initial state.
Definition at line 76 of file RooQuasiRandomGenerator.cxx.
Definition at line 37 of file RooQuasiRandomGenerator.h.
|
staticprivate |
Definition at line 43 of file RooQuasiRandomGenerator.h.
Definition at line 42 of file RooQuasiRandomGenerator.h.
|
private |
Definition at line 39 of file RooQuasiRandomGenerator.h.
|
staticprivate |
Definition at line 45 of file RooQuasiRandomGenerator.h.
|
staticprivate |
Definition at line 44 of file RooQuasiRandomGenerator.h.
|
private |
Definition at line 40 of file RooQuasiRandomGenerator.h.