SSJ
V. labo.

umontreal.iro.lecuyer.hups
Class CycleBasedPointSet.CycleBasedPointSetIterator

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

public class CycleBasedPointSet.CycleBasedPointSetIterator
extends Object


Constructor Summary
CycleBasedPointSet.CycleBasedPointSetIterator()
           
 
Method Summary
 String formatState()
           
 boolean hasNextCoordinate()
          .
 double nextCoordinate()
          .
 void nextCoordinates(double[] p, int dim)
          .
 double nextDouble()
          Returns a (pseudo)random number from the uniform distribution over the interval (0, 1), using this stream, after advancing its state by one step.
 int nextPoint(double[] p, int dim)
          .
 void resetCurCoordIndex()
          .
 void resetCurCycle(int index)
           
 void resetCurPointIndex()
          .
 int resetToNextPoint()
          .
 void setCurCoordIndex(int i)
          .
 void setCurPointIndex(int i)
          .
 
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

CycleBasedPointSet.CycleBasedPointSetIterator

public CycleBasedPointSet.CycleBasedPointSetIterator()
Method Detail

resetCurCycle

public void resetCurCycle(int index)

setCurCoordIndex

public void setCurCoordIndex(int i)
Description copied from interface: PointSetIterator
. \begin{tabb}
 Sets the current coordinate index to $j$, so that
 the next calls...
 ...n be useful to skip certain coordinates for each point, for example.
 \end{tabb}
jindex of the new current coordinate

Specified by:
setCurCoordIndex in interface PointSetIterator

resetCurCoordIndex

public void resetCurCoordIndex()
Description copied from interface: PointSetIterator
. \begin{tabb}
 Equivalent to \method{setCurCoordIndex}{}~\texttt{(0)}.
 \end{tabb}

Specified by:
resetCurCoordIndex in interface PointSetIterator

hasNextCoordinate

public boolean hasNextCoordinate()
Description copied from interface: PointSetIterator
. \begin{tabb}
 Returns \texttt{true} if the current point has another coordinate.
 This can be useful for testing if coordinates are still available.
 \end{tabb}
true if the current point has another coordinate

Specified by:
hasNextCoordinate in interface PointSetIterator

nextDouble

public double nextDouble()
Description copied from interface: RandomStream
Returns a (pseudo)random number from the uniform distribution over the interval (0, 1), using this stream, after advancing its state by one step. The generators programmed in SSJ never return the values 0 or 1.

Specified by:
nextDouble in interface RandomStream
Returns:
the next generated uniform

nextCoordinate

public double nextCoordinate()
Description copied from interface: PointSetIterator
. \begin{tabb}
 Returns the current coordinate $u_{i,j}$\ and advances to the next...
 ...s), it throws a
 \externalclass{java.util}{NoSuchElementException}.
 \end{tabb}
value of the current coordinate NoSuchElementExceptionif no such coordinate is available

Specified by:
nextCoordinate in interface PointSetIterator

nextCoordinates

public void nextCoordinates(double[] p,
                            int dim)
Description copied from interface: PointSetIterator
. \begin{tabb}
 Returns the next \texttt{d} coordinates of the current point in \t...
 ...t{NoSuchElementException} is thrown, as in \method{nextCoordinate}{}.
 \end{tabb}
parray to be filled with the coordinates, starting at index 0 dnumber of coordinates to get NoSuchElementExceptionif there are not enough remaining coordinates in the current point

Specified by:
nextCoordinates in interface PointSetIterator

setCurPointIndex

public void setCurPointIndex(int i)
Description copied from interface: PointSetIterator
. \begin{tabb}
 Resets the current point index to $i$\ and the current coordinate ...
 ...ised here, but only later if we
 ask for a new coordinate or point.
 \end{tabb}
inew index of the current point

Specified by:
setCurPointIndex in interface PointSetIterator

resetCurPointIndex

public void resetCurPointIndex()
Description copied from interface: PointSetIterator
. \begin{tabb}
 Equivalent to \method{setCurPointIndex}{}~\texttt{(0)}.
 \end{tabb}

Specified by:
resetCurPointIndex in interface PointSetIterator

resetToNextPoint

public int resetToNextPoint()
Description copied from interface: PointSetIterator
. \begin{tabb}
 Increases the current point index by 1 and returns its new value.
 ...
 ...l be raised only if we
 ask for a new coordinate or point later on.
 \end{tabb}
index of the new current point

Specified by:
resetToNextPoint in interface PointSetIterator

nextPoint

public int nextPoint(double[] p,
                     int dim)
Description copied from interface: PointSetIterator
. \begin{tabb}
 Same as \method{nextPoint (p, 0, d)}{}.
 \end{tabb}

Specified by:
nextPoint in interface PointSetIterator

formatState

public String formatState()

SSJ
V. labo.

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