umontreal.iro.lecuyer.hups
Class RandomShift
- java.lang.Object
-
- umontreal.iro.lecuyer.hups.RandomShift
-
- All Implemented Interfaces:
- PointSetRandomization
- Direct Known Subclasses:
- LMScrambleShift, SMScrambleShift
public class RandomShift extends java.lang.Object implements PointSetRandomization
This class implements aPointSetRandomization. TheRandomStreamis stored internally. The methodrandomizesimply callsaddRandomShift(stream).This class can be used as a base class to implement a specific randomization by overriding method
randomize.
-
-
Constructor Summary
Constructors Constructor and Description RandomShift()Empty constructor.RandomShift(RandomStream stream)Sets the internalRandomStreamto stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description RandomStreamgetStream()Returns the internalRandomStream.voidrandomize(PointSet p)This method callsaddRandomShift(stream).voidsetStream(RandomStream stream)Sets the internalRandomStreamto stream.
-
-
-
Constructor Detail
-
RandomShift
public RandomShift()
Empty constructor.
-
RandomShift
public RandomShift(RandomStream stream)
Sets the internalRandomStreamto stream.- Parameters:
stream- stream to use in the randomization
-
-
Method Detail
-
randomize
public void randomize(PointSet p)
This method callsaddRandomShift(stream).- Specified by:
randomizein interfacePointSetRandomization- Parameters:
p- Point set to randomize
-
setStream
public void setStream(RandomStream stream)
Sets the internalRandomStreamto stream.- Specified by:
setStreamin interfacePointSetRandomization- Parameters:
stream- stream to use in the randomization
-
getStream
public RandomStream getStream()
Returns the internalRandomStream.- Specified by:
getStreamin interfacePointSetRandomization- Returns:
- stream used in the randomization
-
-
DMelt 3.0 © DataMelt by jWork.ORG