umontreal.iro.lecuyer.hups
Class RandShiftedPointSet
- java.lang.Object
-
- umontreal.iro.lecuyer.hups.PointSet
-
- umontreal.iro.lecuyer.hups.ContainerPointSet
-
- umontreal.iro.lecuyer.hups.RandShiftedPointSet
-
public class RandShiftedPointSet extends ContainerPointSet
This container class embodies a point set to which a random shift modulo 1 is applied (i.e., a single uniform random point is added to all points, modulo 1, to randomize the inner point set). When callingaddRandomShift, a new random shift will be generated. This shift is represented by a vector of d uniforms over (0, 1), where d is the current dimension of the shift.
-
-
Constructor Summary
Constructors Constructor and Description RandShiftedPointSet(PointSet P, int dimShift, RandomStream stream)Constructs a structure to contain a randomly shifted version of P.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidaddRandomShift()Deprecated.voidaddRandomShift(int d1, int d2)Deprecated.voidaddRandomShift(int d1, int d2, RandomStream stream)Changes the stream used for the random shifts to stream, then refreshes the shift for coordinates d1 to d2-1.voidaddRandomShift(RandomStream stream)Changes the stream used for the random shifts to stream, then refreshes all coordinates of the random shift, up to its current dimension.intgetShiftDimension()Returns the number of dimensions of the current random shift.PointSetIteratoriterator()Constructs and returns a point set iterator.java.lang.StringtoString()Formats a string that contains information about the point set.-
Methods inherited from class umontreal.iro.lecuyer.hups.ContainerPointSet
clearRandomShift, getCoordinate, getDimension, getNumPoints, getOriginalPointSet, randomize
-
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
formatPoints, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getStream, randomize, randomize, randomize, randomize, setStream, unrandomize
-
-
-
-
Constructor Detail
-
RandShiftedPointSet
public RandShiftedPointSet(PointSet P, int dimShift, RandomStream stream)
Constructs a structure to contain a randomly shifted version of P. The random shifts will be generated in up to dimShift dimensions, using stream stream.- Parameters:
P- point set being randomizeddimShift- dimension of the initial shiftstream- stream used for generating random shifts
-
-
Method Detail
-
getShiftDimension
public int getShiftDimension()
Returns the number of dimensions of the current random shift.
-
addRandomShift
public void addRandomShift(int d1, int d2, RandomStream stream)Changes the stream used for the random shifts to stream, then refreshes the shift for coordinates d1 to d2-1.- Overrides:
addRandomShiftin classContainerPointSet- Parameters:
d1- lower dimension of the random shiftd2- upper dimension of the random shiftstream- the random stream
-
addRandomShift
public void addRandomShift(RandomStream stream)
Changes the stream used for the random shifts to stream, then refreshes all coordinates of the random shift, up to its current dimension.- Overrides:
addRandomShiftin classContainerPointSet- Parameters:
stream- the random stream
-
addRandomShift
@Deprecated public void addRandomShift(int d1, int d2)Deprecated.Refreshes the random shift (generates new uniform values for the random shift coordinates) for coordinates d1 to d2-1.- Overrides:
addRandomShiftin classPointSet
-
addRandomShift
@Deprecated public void addRandomShift()
Deprecated.- Overrides:
addRandomShiftin classPointSet
-
toString
public java.lang.String toString()
Description copied from class:PointSetFormats a string that contains information about the point set.- Overrides:
toStringin classContainerPointSet- Returns:
- string representation of the point set information
-
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.- Overrides:
iteratorin classContainerPointSet- Returns:
- point set iterator for the point set
-
-
DMelt 3.0 © DataMelt by jWork.ORG