SSJ
3.3.1
Stochastic Simulation in Java
|
This class implements a default point set iterator. More...
Public Member Functions | |
void | setCurCoordIndex (int j) |
Set current coordinate to j. | |
void | resetCurCoordIndex () |
Set current coordinate to 0. | |
int | getCurCoordIndex () |
boolean | hasNextCoordinate () |
double | nextCoordinate () |
void | nextCoordinates (double p[], int d) |
void | setCurPointIndex (int i) |
Resets the current point index to i and current coordinate to 0. | |
void | resetCurPointIndex () |
Resets both the current point index and the current coordinate to 0. | |
int | resetToNextPoint () |
Resets the current point index to the next one and current coordinate to 0, and returns the new current point index. | |
int | getCurPointIndex () |
boolean | hasNextPoint () |
int | nextPoint (double p[], int fromDim, int d) |
Returns in p a block of d successive coordinates of the current point, starting at coordinate fromDim , and advances to the next point. More... | |
int | nextPoint (double p[], int d) |
Same as nextPoint(p, 0, d). | |
void | resetStartStream () |
Same as resetCurPointIndex(). | |
void | resetStartSubstream () |
Same as resetCurCoordIndex(). | |
void | resetNextSubstream () |
Same as resetToNextPoint(). | |
void | setAntithetic (boolean b) |
Not implemented here, raises an exception. More... | |
double | nextDouble () |
Same as nextCoordinate() | |
void | nextArrayOfDouble (double[] u, int start, int n) |
Returns in p[start..start+n-1] a block of n successive coordinates of the current point, obtained by calling nextDouble() n times. | |
int | nextInt (int i, int j) |
Similar to nextDouble(), but returns an integer uniformly distributed in [i..j] . | |
void | nextArrayOfInt (int i, int j, int[] u, int start, int n) |
Similar to nextArrayOfDouble but returns in u[start..start+n-1] a block of n integers uniformly distributed in [i..j] . | |
String | formatState () |
Public Member Functions inherited from PointSetIterator | |
void | nextCoordinates (double[] p, int d) |
Returns in p the next d coordinates of the current point and advances the current coordinate index by d . More... | |
int | nextPoint (double[] p, int fromDim, int d) |
Returns in p the next d coordinates of the current point, starting at coordinate fromDim (i.e., after skipping fromDim coordinates), then advances to the next point and returns the index of the new current point. More... | |
int | nextPoint (double[] p, int d) |
Same as nextPoint(p, 0, d). | |
Public Member Functions inherited from RandomStream | |
String | toString () |
Returns a string containing the current state of this stream. More... | |
Protected Member Functions | |
void | outOfBounds () |
Error message for index out of bounds. | |
Protected Attributes | |
int | curPointIndex = 0 |
Index of the current point. | |
int | curCoordIndex = 0 |
Index of the current coordinate. | |
double | EpsilonHalf = 1.0 / Num.TWOEXP[55] |
Default constant epsilon/2 added to the points after a random shift. | |
This class implements a default point set iterator.
Since it is inherited by subclasses, it can be used as a base class for iterators. It is implemented as an inner class because it can then use directly the variables of the PointSet class. It would be more difficult and cumbersome to access those variables if it was implemented as a separate class.
String formatState | ( | ) |
String
that gives the current point index and current coordinate index. int getCurCoordIndex | ( | ) |
Implements PointSetIterator.
int getCurPointIndex | ( | ) |
Implements PointSetIterator.
boolean hasNextCoordinate | ( | ) |
Implements PointSetIterator.
boolean hasNextPoint | ( | ) |
true
iff the current point is not the last one. Implements PointSetIterator.
double nextCoordinate | ( | ) |
Implements PointSetIterator.
void nextCoordinates | ( | double | p[], |
int | d | ||
) |
p
the d
next coordinates int nextPoint | ( | double | p[], |
int | fromDim, | ||
int | d | ||
) |
Returns in p
a block of d
successive coordinates of the current point, starting at coordinate fromDim
, and advances to the next point.
void setAntithetic | ( | boolean | b | ) |
Not implemented here, raises an exception.
Must be here for compatibility with the RandomStream interface.