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. | |
| 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. | |
| 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 umontreal.ssj.rng.RandomStream | |
| String | toString () |
| Returns a string containing the current state of this stream. | |
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.
Definition at line 556 of file PointSet.java.
| String umontreal.ssj.hups.PointSet.DefaultPointSetIterator.formatState | ( | ) |
Reimplemented in umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator.
Definition at line 765 of file PointSet.java.
| int umontreal.ssj.hups.PointSet.DefaultPointSetIterator.getCurCoordIndex | ( | ) |
Implements umontreal.ssj.hups.PointSetIterator.
Definition at line 600 of file PointSet.java.
| int umontreal.ssj.hups.PointSet.DefaultPointSetIterator.getCurPointIndex | ( | ) |
Implements umontreal.ssj.hups.PointSetIterator.
Definition at line 661 of file PointSet.java.
| boolean umontreal.ssj.hups.PointSet.DefaultPointSetIterator.hasNextCoordinate | ( | ) |
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, and umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator.
Definition at line 607 of file PointSet.java.
| boolean umontreal.ssj.hups.PointSet.DefaultPointSetIterator.hasNextPoint | ( | ) |
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator.
Definition at line 668 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.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.
Implements umontreal.ssj.rng.RandomStream.
Definition at line 735 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.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].
Implements umontreal.ssj.rng.RandomStream.
Definition at line 754 of file PointSet.java.
| double umontreal.ssj.hups.PointSet.DefaultPointSetIterator.nextCoordinate | ( | ) |
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.AntitheticPointSet.AntitheticPointSetIterator, umontreal.ssj.hups.BakerTransformedPointSet.BakerTransformedPointSetIterator, umontreal.ssj.hups.CachedPointSet.CachedPointSetIterator, umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, umontreal.ssj.hups.CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator, umontreal.ssj.hups.DigitalNet.DigitalNetIterator, umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2Iterator, umontreal.ssj.hups.Rank1Lattice.Rank1LatticeIterator, and umontreal.ssj.hups.SortedAndCutPointSet.SortedAndCutPointSetIterator.
Definition at line 614 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.nextCoordinates | ( | double | p[], |
| int | d ) |
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.AntitheticPointSet.AntitheticPointSetIterator, umontreal.ssj.hups.BakerTransformedPointSet.BakerTransformedPointSetIterator, umontreal.ssj.hups.CachedPointSet.CachedPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, and umontreal.ssj.hups.CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator.
Definition at line 623 of file PointSet.java.
| double umontreal.ssj.hups.PointSet.DefaultPointSetIterator.nextDouble | ( | ) |
Same as nextCoordinate().
Implements umontreal.ssj.rng.RandomStream.
Reimplemented in umontreal.ssj.hups.AntitheticPointSet.AntitheticPointSetIterator, umontreal.ssj.hups.BakerTransformedPointSet.BakerTransformedPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, umontreal.ssj.hups.DigitalNet.DigitalNetIterator, and umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2Iterator.
Definition at line 727 of file PointSet.java.
| int umontreal.ssj.hups.PointSet.DefaultPointSetIterator.nextInt | ( | int | i, |
| int | j ) |
Similar to nextDouble(), but returns an integer uniformly distributed in [i..j].
Implements umontreal.ssj.rng.RandomStream.
Definition at line 746 of file PointSet.java.
| int umontreal.ssj.hups.PointSet.DefaultPointSetIterator.nextPoint | ( | double | p[], |
| int | d ) |
Same as nextPoint(p, 0, d).
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.AntitheticPointSet.AntitheticPointSetIterator, umontreal.ssj.hups.BakerTransformedPointSet.BakerTransformedPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, umontreal.ssj.hups.CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator, and umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2Iterator.
Definition at line 687 of file PointSet.java.
| int umontreal.ssj.hups.PointSet.DefaultPointSetIterator.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.
Implements umontreal.ssj.hups.PointSetIterator.
Definition at line 678 of file PointSet.java.
|
protected |
Error message for index out of bounds.
Definition at line 576 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.resetCurCoordIndex | ( | ) |
Set current coordinate to 0.
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, and umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator.
Definition at line 593 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.resetCurPointIndex | ( | ) |
Resets both the current point index and the current coordinate to 0.
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, umontreal.ssj.hups.DigitalNet.DigitalNetIterator, and umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2Iterator.
Definition at line 645 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.resetNextSubstream | ( | ) |
Same as resetToNextPoint().
Implements umontreal.ssj.rng.RandomStream.
Definition at line 710 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.resetStartStream | ( | ) |
Same as resetCurPointIndex().
Implements umontreal.ssj.rng.RandomStream.
Definition at line 696 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.resetStartSubstream | ( | ) |
Same as resetCurCoordIndex().
Implements umontreal.ssj.rng.RandomStream.
Definition at line 703 of file PointSet.java.
| int umontreal.ssj.hups.PointSet.DefaultPointSetIterator.resetToNextPoint | ( | ) |
Resets the current point index to the next one and current coordinate to 0, and returns the new current point index.
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, umontreal.ssj.hups.DigitalNet.DigitalNetIterator, umontreal.ssj.hups.DigitalNet.DigitalNetIteratorNoGray, umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2Iterator, umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2IteratorNoGray, umontreal.ssj.hups.DigitalSequence.DigitalNetIteratorShiftGenerators, umontreal.ssj.hups.DigitalSequence.DigitalNetIteratorShiftNoGray, umontreal.ssj.hups.DigitalSequenceBase2.DigitalNetBase2IteratorShiftGenerators, and umontreal.ssj.hups.DigitalSequenceBase2.DigitalNetBase2IteratorShiftNoGray.
Definition at line 653 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.setAntithetic | ( | boolean | b | ) |
Not implemented here, raises an exception.
Must be here for compatibility with the
RandomStream interface.
Definition at line 720 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.setCurCoordIndex | ( | int | j | ) |
Set current coordinate to j.
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, and umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator.
Definition at line 586 of file PointSet.java.
| void umontreal.ssj.hups.PointSet.DefaultPointSetIterator.setCurPointIndex | ( | int | i | ) |
Resets the current point index to i and current coordinate to 0.
Implements umontreal.ssj.hups.PointSetIterator.
Reimplemented in umontreal.ssj.hups.ContainerPointSet.ContainerPointSetIterator, umontreal.ssj.hups.CycleBasedPointSet.CycleBasedPointSetIterator, umontreal.ssj.hups.DigitalNet.DigitalNetIterator, umontreal.ssj.hups.DigitalNet.DigitalNetIteratorNoGray, umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2Iterator, umontreal.ssj.hups.DigitalNetBase2.DigitalNetBase2IteratorNoGray, umontreal.ssj.hups.DigitalSequence.DigitalNetIteratorShiftGenerators, umontreal.ssj.hups.DigitalSequence.DigitalNetIteratorShiftNoGray, umontreal.ssj.hups.DigitalSequenceBase2.DigitalNetBase2IteratorShiftGenerators, and umontreal.ssj.hups.DigitalSequenceBase2.DigitalNetBase2IteratorShiftNoGray.
Definition at line 637 of file PointSet.java.
|
protected |
Index of the current coordinate.
Definition at line 566 of file PointSet.java.
|
protected |
Index of the current point.
Definition at line 561 of file PointSet.java.
|
protected |
Default constant epsilon/2 added to the points after a random shift.
Definition at line 571 of file PointSet.java.