SSJ
V. labo.

umontreal.iro.lecuyer.hups
Class CycleBasedPointSetBase2

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

public abstract class CycleBasedPointSetBase2
extends CycleBasedPointSet

Similar to CycleBasedPointSet, except that the successive values in the cycles are stored as integers in the range {0,..., 2k -1}, where 1 <= k <= 31. The output values ui, j are obtained by dividing these integer values by 2k. Point sets where the successive coordinates of each point are obtained via linear recurrences modulo 2 (e.g., linear feedback shift registers or Korobov-type polynomial lattice rules) are naturally expressed in this form. Storing the integers 2kui, j instead of the ui, j themselves makes it easier to apply randomizations such as digital random shifts in base 2, which are applied to the bits before transforming the value to a real number ui, j. When a random digital shift is performed, it applies a bitwise exclusive-or of all the points with a single random point.


Nested Class Summary
 class CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator
           
 
Nested classes/interfaces inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet
CycleBasedPointSet.CycleBasedPointSetIterator
 
Constructor Summary
CycleBasedPointSetBase2()
           
 
Method Summary
 void addRandomShift(int d1, int d2, RandomStream stream)
          Adds a random digital shift in base 2 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)
          .
 PointSetIterator iterator()
          .
 
Methods inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet
getDimension, 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

CycleBasedPointSetBase2

public CycleBasedPointSetBase2()
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

Overrides:
getCoordinate in class CycleBasedPointSet

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 CycleBasedPointSet

addRandomShift

public void addRandomShift(int d1,
                           int d2,
                           RandomStream stream)
Adds a random digital shift in base 2 to all the points of the point set, using stream stream to generate the random numbers, for coordinates d1 to d2 - 1. This applies a bitwise exclusive-or of all the points with a single random point.

Overrides:
addRandomShift in class CycleBasedPointSet
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 CycleBasedPointSet

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 CycleBasedPointSet

SSJ
V. labo.

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