SSJ
V. 2.6.

umontreal.iro.lecuyer.hups
Class CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator

java.lang.Object
  extended by umontreal.iro.lecuyer.hups.CycleBasedPointSet.CycleBasedPointSetIterator
      extended by umontreal.iro.lecuyer.hups.CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator
All Implemented Interfaces:
PointSetIterator, RandomStream
Enclosing class:
CycleBasedPointSetBase2

public class CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator
extends CycleBasedPointSet.CycleBasedPointSetIterator


Constructor Summary
CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator()
           
 
Method Summary
 double nextCoordinate()
          Returns the current coordinate ui, j and advances to the next one.
 void nextCoordinates(double[] p, int dim)
          Returns the next d coordinates of the current point in p and advances the current coordinate index by d.
 int nextPoint(double[] p, int dim)
          Returns the first d coordinates of the current point in p, advances to the next point, and returns the index of the new current point.
 void resetCurCycle(int index)
           
 
Methods inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet.CycleBasedPointSetIterator
formatState, hasNextCoordinate, nextDouble, resetCurCoordIndex, resetCurPointIndex, resetToNextPoint, setCurCoordIndex, setCurPointIndex
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface umontreal.iro.lecuyer.rng.RandomStream
toString
 

Constructor Detail

CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator

public CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator()
Method Detail

resetCurCycle

public void resetCurCycle(int index)
Overrides:
resetCurCycle in class CycleBasedPointSet.CycleBasedPointSetIterator

nextCoordinate

public double nextCoordinate()
Description copied from interface: PointSetIterator
Returns the current coordinate ui, j and advances to the next one. If no current coordinate is available (either because the current point index has reached the number of points or because the current coordinate index has reached the number of dimensions), it throws a NoSuchElementException.

Specified by:
nextCoordinate in interface PointSetIterator
Overrides:
nextCoordinate in class CycleBasedPointSet.CycleBasedPointSetIterator
Returns:
value of the current coordinate

nextCoordinates

public void nextCoordinates(double[] p,
                            int dim)
Description copied from interface: PointSetIterator
Returns the next d coordinates of the current point in p and advances the current coordinate index by d. If the remaining number of coordinates is too small, a NoSuchElementException is thrown, as in nextCoordinate.

Specified by:
nextCoordinates in interface PointSetIterator
Overrides:
nextCoordinates in class CycleBasedPointSet.CycleBasedPointSetIterator
Parameters:
p - array to be filled with the coordinates, starting at index 0
dim - number of coordinates to get

nextPoint

public int nextPoint(double[] p,
                     int dim)
Description copied from interface: PointSetIterator
Returns the first d coordinates of the current point in p, advances to the next point, and returns the index of the new current point. Even if the current coordinate index is 0, the point returned starts from coordinate 0. After obtaining the last point via this method, the current point index (returned by the method) is equal to the number of points, so it is no longer a valid point index. An exception will then be raised if we attempt to generate additional points or coordinates.

Specialized implementations of this method often allow for increased efficiency, e.g., for cycle-based point sets where the cycles (but not the points) are stored explicitly or for digital nets by allowing non-incremental point enumerations via Gray-code counters.

Specified by:
nextPoint in interface PointSetIterator
Overrides:
nextPoint in class CycleBasedPointSet.CycleBasedPointSetIterator
Parameters:
p - array to be filled with the coordinates, starting from array index 0
dim - number of coordinates to return
Returns:
index of the new current point

SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.