16 #ifndef ROO_QUASI_RANDOM_GENERATOR
17 #define ROO_QUASI_RANDOM_GENERATOR
21 class RooQuasiRandomGenerator {
23 RooQuasiRandomGenerator();
24 virtual ~RooQuasiRandomGenerator();
26 Bool_t generate(UInt_t dimension, Double_t vector[]);
27 enum { MaxDimension = 12 , NBits = 31 , MaxDegree = 50 , MaxPrimitiveDegree = 5 };
29 void calculateCoefs(UInt_t dimension);
30 void calculateV(
const int px[],
int px_degree,
31 int pb[],
int * pb_degree,
int v[],
int maxv);
32 void polyMultiply(
const int pa[],
int pa_degree,
const int pb[],
33 int pb_degree,
int pc[],
int * pc_degree);
35 inline Int_t add(Int_t x, Int_t y)
const {
return (x+y)%2; }
36 inline Int_t mul(Int_t x, Int_t y)
const {
return (x*y)%2; }
37 inline Int_t sub(Int_t x, Int_t y)
const {
return add(x,y); }
42 static Bool_t _coefsCalculated;
43 static Int_t _cj[NBits][MaxDimension];
44 static const Int_t _primitivePoly[MaxDimension+1][MaxPrimitiveDegree+1];
45 static const Int_t _polyDegree[MaxDimension+1];
47 ClassDef(RooQuasiRandomGenerator,0)