umontreal.iro.lecuyer.hups
Class ContainerPointSet
- java.lang.Object
-
- umontreal.iro.lecuyer.hups.PointSet
-
- 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 classAntitheticPointSet, where each output coordinate ui, j is transformed into 1 - ui, j. Another example isRandShiftedPointSet.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
Constructors Constructor and Description ContainerPointSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddRandomShift(int d1, int d2, RandomStream stream)Calls addRandomShift(d1, d2, stream) of the contained point set.voidaddRandomShift(RandomStream stream)Calls addRandomShift(stream) of the contained point set.voidclearRandomShift()Calls clearRandomShift() of the contained point set.doublegetCoordinate(int i, int j)Returns ui, j, the coordinate j of the point i.intgetDimension()Returns the dimension of the contained point set.intgetNumPoints()Returns the number of points of the contained point set.PointSetgetOriginalPointSet()Returns the (untransformed) point set inside this container.PointSetIteratoriterator()Constructs and returns a point set iterator.voidrandomize(PointSetRandomization rand)Randomizes the contained point set using rand.java.lang.StringtoString()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
-
-
-
-
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:
getDimensionin classPointSet- Returns:
- the dimension of the contained point set
-
getNumPoints
public int getNumPoints()
Returns the number of points of the contained point set.- Overrides:
getNumPointsin classPointSet- Returns:
- the number of points of the contained point set
-
getCoordinate
public double getCoordinate(int i, int j)Description copied from class:PointSetReturns ui, j, the coordinate j of the point i.- Specified by:
getCoordinatein classPointSet- Parameters:
i- index of the point to look forj- index of the coordinate to look for- Returns:
- the value of ui, j
-
iterator
public PointSetIterator iterator()
Description copied from class:PointSetConstructs and returns a point set iterator. The default implementation returns an iterator that uses the methodgetCoordinate(i,j) to iterate over the points and coordinates, but subclasses can reimplement it for better efficiency.
-
randomize
public void randomize(PointSetRandomization rand)
Randomizes the contained point set using rand.- Overrides:
randomizein classPointSet- Parameters:
rand-PointSetRandomizationto use
-
addRandomShift
public void addRandomShift(int d1, int d2, RandomStream stream)Calls addRandomShift(d1, d2, stream) of the contained point set.- Overrides:
addRandomShiftin classPointSet- Parameters:
d1- lower dimension of the random shiftd2- upper dimension of the random shiftstream- the random stream
-
addRandomShift
public void addRandomShift(RandomStream stream)
Calls addRandomShift(stream) of the contained point set.- Overrides:
addRandomShiftin classPointSet- Parameters:
stream- the random stream
-
clearRandomShift
public void clearRandomShift()
Calls clearRandomShift() of the contained point set.- Overrides:
clearRandomShiftin classPointSet
-
-
DMelt 3.0 © DataMelt by jWork.ORG