26package umontreal.ssj.rng;
53 st.resetStartStream();
57 st.resetStartSubstream();
61 st.resetNextSubstream();
69 return "Antithetic of " + st.toString();
76 return 1.0 - st.nextDouble();
84 return j - i - st.nextInt(i, j);
96 st.nextArrayOfDouble(u, start, n);
97 for (
int ii = start; ii < start + n; ii++)
112 st.nextArrayOfInt(i, j, u, start, n);
113 for (
int ii = start; ii < start + n; ii++)
114 u[ii] = j - i - u[ii];
String toString()
Returns a string starting with "Antithetic of " and finishing with the result of the call to the toSt...
void resetStartSubstream()
Reinitializes the stream to the beginning of its current substream:
void nextArrayOfInt(int i, int j, int[] u, int start, int n)
Calls nextArrayOfInt (i, j, u, start, n) for the base stream, then replaces each u[i] by j - i - u[i]...
void resetStartStream()
Reinitializes the stream to its initial state : and are set to .
AntitheticStream(RandomStream stream)
Constructs a new antithetic stream, using the random numbers from the base stream stream.
int nextInt(int i, int j)
Returns j - i - s.nextInt(i, j) where s is the base stream.
void resetNextSubstream()
Reinitializes the stream to the beginning of its next substream:
double nextDouble()
Returns 1.0 - s.nextDouble() where s is the base stream.
void nextArrayOfDouble(double[] u, int start, int n)
Calls nextArrayOfDouble (u, start, n) for the base stream, then replaces each u[i] by 1....
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...