SSJ
V. 1.2.5.

umontreal.iro.lecuyer.hups
Class ContainerPointSet

java.lang.Object
  extended by umontreal.iro.lecuyer.hups.PointSet
      extended by umontreal.iro.lecuyer.hups.ContainerPointSet
Direct Known Subclasses:
AntitheticPointSet, BakerTransformedPointSet, RandShiftedPointSet

public abstract class ContainerPointSet
extends PointSet

This acts as a generic base class for all container classes that contain a point set and apply some kind of transformation to the coordinates to define a new point set. One example of such transformation is the antithetic map, applied by the container class AntitheticPointSet, where each output coordinate ui, j is transformed into 1 - ui, j. Another example is RandShiftedPointSet.

The class implements a specialized type of iterator for container point sets. This type of iterator contains itself an iterator for the containee and uses it to access the points and coordinates internally, instead of maintaining itself indices for the current point and current coordinate.


Constructor Summary
ContainerPointSet()
           
 
Method Summary
 void addRandomShift()
           
 void addRandomShift(int d1, int d2)
          Deprecated: Similar to addRandomShift (d1, d2, stream), with the current random stream.
 void addRandomShift(int d1, int d2, RandomStream stream)
          This method does nothing for this generic class.
 void addRandomShift(RandomStream stream)
          Similar to addRandomShift (0, d2, stream), with d2 the dimension of the current random shift.
 void clearRandomShift()
          Erases the current random shift, if any.
 String formatPoints()
          Same as invoking formatPoints with n and d equal to the number of points and the dimension, respectively.
 double getCoordinate(int i, int j)
          Returns ui, j, the coordinate j of the point i.
 int getDimension()
          Returns the dimension (number of available coordinates) of the point set.
 int getNumPoints()
          Returns the number of points.
 PointSetIterator iterator()
          Constructs and returns a point set iterator.
 String toString()
          Formats a string that contains the information about the point set.
 
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
formatPoints, randomize, randomize, randomize, randomize, unrandomize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerPointSet

public ContainerPointSet()
Method Detail

getDimension

public int getDimension()
Description copied from class: PointSet
Returns the dimension (number of available coordinates) of the point set. If the dimension is actually infinite, Integer.MAX_VALUE is returned.

Overrides:
getDimension in class PointSet
Returns:
the dimension of the point set or Integer.MAX_VALUE if it is infinite

getNumPoints

public int getNumPoints()
Description copied from class: PointSet
Returns the number of points. If this number is actually infinite, Integer.MAX_VALUE is returned.

Overrides:
getNumPoints in class PointSet
Returns:
the number of points in the point set or Integer.MAX_VALUE if the point set has an infinity of points.

getCoordinate

public double getCoordinate(int i,
                            int j)
Description copied from class: PointSet
Returns ui, j, the coordinate j of the point i.

Specified by:
getCoordinate in class PointSet
Parameters:
i - index of the point to look for
j - index of the coordinate to look for
Returns:
the value of ui, j

iterator

public PointSetIterator iterator()
Description copied from class: PointSet
Constructs and returns a point set iterator. The default implementation returns an iterator that uses the method getCoordinate (i,j) to iterate over the points and coordinates, but subclasses can reimplement it for better efficiency.

Overrides:
iterator in class PointSet
Returns:
point set iterator for the point set

addRandomShift

public void addRandomShift(int d1,
                           int d2,
                           RandomStream stream)
Description copied from class: PointSet
This method does nothing for this generic class. In some subclasses, it 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.

Overrides:
addRandomShift in class PointSet

addRandomShift

public void addRandomShift(int d1,
                           int d2)
Description copied from class: PointSet
Deprecated: Similar to addRandomShift (d1, d2, stream), with the current random stream. This method does nothing for this generic class.

Overrides:
addRandomShift in class PointSet

addRandomShift

public void addRandomShift(RandomStream stream)
Description copied from class: PointSet
Similar to addRandomShift (0, d2, stream), with d2 the dimension of the current random shift. This method does nothing for this generic class.

Overrides:
addRandomShift in class PointSet

addRandomShift

public void addRandomShift()
Overrides:
addRandomShift in class PointSet

clearRandomShift

public void clearRandomShift()
Description copied from class: PointSet
Erases the current random shift, if any.

Overrides:
clearRandomShift in class PointSet

toString

public String toString()
Description copied from class: PointSet
Formats a string that contains the information about the point set.

Overrides:
toString in class PointSet
Returns:
string representation of the point set information

formatPoints

public String formatPoints()
Description copied from class: PointSet
Same as invoking formatPoints with n and d equal to the number of points and the dimension, respectively.

Overrides:
formatPoints in class PointSet
Returns:
string representation of all the points in the point set

SSJ
V. 1.2.5.

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