SSJ
V. labo.

umontreal.iro.lecuyer.hups
Class CycleBasedPointSet

java.lang.Object
  extended by umontreal.iro.lecuyer.hups.PointSet
      extended by umontreal.iro.lecuyer.hups.CycleBasedPointSet
Direct Known Subclasses:
CycleBasedPointSetBase2, LCGPointSet

public abstract class CycleBasedPointSet
extends PointSet

This abstract class provides the basic structures for storing and manipulating a highly uniform point set defined by a set of cycles. The s-dimensional points are all the vectors of s successive values found in any of the cycles, from any starting point. Since this is defined for any positive integer s, the points effectively have an infinite number of dimensions. The number of points, n, is the sum of lengths of all the cycles. The cycles of the point set are simply stored as a list of arrays, where each array contains the successive values for a given cycle. By default, the values are stored in double.

This structure is convenient for implementing recurrence-based point sets, where the point set in s dimensions is defined as the set of all vectors of s successive values of a periodic recurrence, from all its possible initial states.


Nested Class Summary
 class CycleBasedPointSet.CycleBasedPointSetIterator
           
 
Constructor Summary
CycleBasedPointSet()
           
 
Method Summary
 void addRandomShift(int d1, int d2, RandomStream stream)
          Adds a random shift to all the points of the point set, using stream stream to generate the random numbers, for coordinates d1 to d2 - 1.
 void clearRandomShift()
          .
 String formatPoints()
          .
 double getCoordinate(int i, int j)
          .
 int getDimension()
          .
 PointSetIterator iterator()
          .
 String toString()
          .
 
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
addRandomShift, addRandomShift, addRandomShift, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getNumPoints, getStream, randomize, randomize, randomize, randomize, randomize, setStream, unrandomize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CycleBasedPointSet

public CycleBasedPointSet()
Method Detail

getCoordinate

public double getCoordinate(int i,
                            int j)
Description copied from class: PointSet
. \begin{tabb}
 Returns $u_{i,j}$, the coordinate $j$\ of the point $i$.
 \richard{...
 ...xttt{getCoordinate} impl\'ementent le random shift
 quand il existe?}
 \end{tabb}
iindex of the point to look for jindex of the coordinate to look for the value of ui, j

Specified by:
getCoordinate in class PointSet

addRandomShift

public void addRandomShift(int d1,
                           int d2,
                           RandomStream stream)
Adds a random shift to all the points of the point set, using stream stream to generate the random numbers, for coordinates d1 to d2 - 1. This applies an addition modulo 1 of a single random point to all the points.

Overrides:
addRandomShift in class PointSet
Parameters:
stream - Stream used to generate random numbers

clearRandomShift

public void clearRandomShift()
Description copied from class: PointSet
. \begin{tabb}
 Erases the current random shift, if any.
 \end{tabb}

Overrides:
clearRandomShift in class PointSet

getDimension

public int getDimension()
Description copied from class: PointSet
. \begin{tabb}
 Returns the dimension (number of available coordinates) of the poi...
 ...nsion is actually infinite, \texttt{Integer.MAX\_VALUE} is returned.
 \end{tabb}
the dimension of the point set or Integer.MAX_VALUE if it is infinite

Overrides:
getDimension in class PointSet

iterator

public PointSetIterator iterator()
Description copied from class: PointSet
. \begin{tabb}
 Constructs and returns a point set iterator.
 The default implemen...
 ...oordinates, but subclasses can reimplement it
 for better efficiency.
 \end{tabb}
point set iterator for the point set

Overrides:
iterator in class PointSet

toString

public String toString()
Description copied from class: PointSet
. \begin{tabb}
 Formats a string that contains information about the point set.
 \end{tabb}
string representation of the point set information

Overrides:
toString in class PointSet

formatPoints

public String formatPoints()
Description copied from class: PointSet
. \begin{tabb}
 Same as invoking \method{formatPoints}{int,int}\texttt{(n, d)} wit...
 ...the
 number of points and the dimension of this object, respectively.
 \end{tabb}
string representation of all the points in the point set UnsupportedOperationExceptionif the number of points or dimension of the point set is infinite

Overrides:
formatPoints in class PointSet

SSJ
V. labo.

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