26package umontreal.ssj.hups;
28import umontreal.ssj.util.PrintfFormat;
29import umontreal.ssj.rng.*;
30import cern.colt.list.*;
84 param =
new F2wStructure(w, r, modQ, step, nbcoeff, coeff, nocoeff);
85 numBits = param.numBits;
86 normFactor = param.normFactor;
99 numBits = param.numBits;
100 normFactor = param.normFactor;
106 return s + param.toString();
109 private void fillCyclesPolyLCG() {
112 int mask1 = (1 << (31 - param.r * param.w)) - 1;
118 boolean stateVisited[] =
new boolean[n];
120 for (i = 0; i < n; i++)
121 stateVisited[i] =
false;
124 while (startState < n) {
125 stateVisited[startState] =
true;
126 c =
new IntArrayList();
127 param.state = startState << param.S;
131 param.output = param.F2wPolyLCG();
133 while (param.state != (startState << param.S)) {
134 stateVisited[param.state >> param.S] =
true;
138 param.output = param.F2wPolyLCG();
141 for (i = startState + 1; i < n; i++)
142 if (stateVisited[i] ==
false)
Similar to CycleBasedPointSet, except that the successive values in the cycles are stored as integers...
void addCycle(AbstractList c)
Adds the cycle c to the list of all cycles.
F2wCycleBasedPolyLCG(int w, int r, int modQ, int step, int nbcoeff, int coeff[], int nocoeff[])
Constructs a point set with points.
String toString()
Formats a string that contains information about the point set.
F2wCycleBasedPolyLCG(String filename, int no)
Constructs a point set after reading its parameters from file filename; the parameters are located at...
This class implements methods and fields needed by the classes.
int getLog2N()
This method returns the product .
int numPoints
Number of points.
double EpsilonHalf
To avoid 0 for nextCoordinate when random shifting, we add this to each coordinate.
Extends the abstract class RandomStreamBase by using as a backbone (or main) generator the combined m...
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...