Warning, file /include/root/RooQuasiRandomGenerator.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_QUASI_RANDOM_GENERATOR
0017 #define ROO_QUASI_RANDOM_GENERATOR
0018
0019 #include "Rtypes.h"
0020
0021 class RooQuasiRandomGenerator {
0022 public:
0023 RooQuasiRandomGenerator();
0024 virtual ~RooQuasiRandomGenerator();
0025 void reset();
0026 bool generate(UInt_t dimension, double vector[]);
0027 enum { MaxDimension = 12 , NBits = 31 , MaxDegree = 50 , MaxPrimitiveDegree = 5 };
0028 protected:
0029 void calculateCoefs(UInt_t dimension);
0030 void calculateV(const int px[], int px_degree,
0031 int pb[], int * pb_degree, int v[], int maxv);
0032 void polyMultiply(const int pa[], int pa_degree, const int pb[],
0033 int pb_degree, int pc[], int * pc_degree);
0034
0035 inline Int_t add(Int_t x, Int_t y) const { return (x+y)%2; }
0036 inline Int_t mul(Int_t x, Int_t y) const { return (x*y)%2; }
0037 inline Int_t sub(Int_t x, Int_t y) const { return add(x,y); }
0038 private:
0039 Int_t *_nextq;
0040 Int_t _sequenceCount;
0041
0042 static bool _coefsCalculated;
0043 static Int_t _cj[NBits][MaxDimension];
0044 static const Int_t _primitivePoly[MaxDimension+1][MaxPrimitiveDegree+1];
0045 static const Int_t _polyDegree[MaxDimension+1];
0046
0047 ClassDef(RooQuasiRandomGenerator,0)
0048 };
0049
0050 #endif
0051
0052