SSJ
V. 2.6.2.

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 contained point set 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(int d1, int d2, RandomStream stream)
          Calls addRandomShift(d1, d2, stream) of the contained point set.
 void addRandomShift(RandomStream stream)
          Calls addRandomShift(stream) of the contained point set.
 void clearRandomShift()
          Calls clearRandomShift() of the contained point set.
 double getCoordinate(int i, int j)
          Returns ui, j, the coordinate j of the point i.
 int getDimension()
          Returns the dimension of the contained point set.
 int getNumPoints()
          Returns the number of points of the contained point set.
 PointSet getOriginalPointSet()
          Returns the (untransformed) point set inside this container.
 PointSetIterator iterator()
          Constructs and returns a point set iterator.
 void randomize(PointSetRandomization rand)
          Randomizes the contained point set using rand.
 String toString()
          Formats a string that contains information about the point set.
 
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
addRandomShift, addRandomShift, formatPoints, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getStream, randomize, randomize, randomize, randomize, setStream, unrandomize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerPointSet

public ContainerPointSet()
Method Detail

getOriginalPointSet

public PointSet getOriginalPointSet()
Returns the (untransformed) point set inside this container.

Returns:
the point set inside this container

getDimension

public int getDimension()
Returns the dimension of the contained point set.

Overrides:
getDimension in class PointSet
Returns:
the dimension of the contained point set

getNumPoints

public int getNumPoints()
Returns the number of points of the contained point set.

Overrides:
getNumPoints in class PointSet
Returns:
the number of points of the contained point set

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

randomize

public void randomize(PointSetRandomization rand)
Randomizes the contained point set using rand.

Overrides:
randomize in class PointSet
Parameters:
rand - PointSetRandomization to use

addRandomShift

public void addRandomShift(int d1,
                           int d2,
                           RandomStream stream)
Calls addRandomShift(d1, d2, stream) of the contained point set.

Overrides:
addRandomShift in class PointSet
Parameters:
d1 - lower dimension of the random shift
d2 - upper dimension of the random shift
stream - the random stream

addRandomShift

public void addRandomShift(RandomStream stream)
Calls addRandomShift(stream) of the contained point set.

Overrides:
addRandomShift in class PointSet
Parameters:
stream - the random stream

clearRandomShift

public void clearRandomShift()
Calls clearRandomShift() of the contained point set.

Overrides:
clearRandomShift in class PointSet

toString

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

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

SSJ
V. 2.6.2.

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