This class implements a umontreal.ssj.hups.PointSetRandomization. More...
Public Member Functions | |
| RandomShift () | |
| Empty constructor: No stream is passed here for the randomization; one must be passed later by setStream. | |
| RandomShift (RandomStream stream) | |
| Constructor that sets the internal umontreal.ssj.rng.RandomStream to stream. | |
| void | randomize (PointSet p) |
This method calls addRandomShift(stream). | |
| void | setStream (RandomStream stream) |
| Sets the internal umontreal.ssj.rng.RandomStream to stream. | |
| RandomStream | getStream () |
| Returns the internal umontreal.ssj.rng.RandomStream. | |
| String | toString () |
| Returns a descriptor of this object. | |
This class implements a umontreal.ssj.hups.PointSetRandomization.
When the PointSet to be randomized is a DigitalNet, the random shift is a random digital shift, otherwise it is a random shift modulo 1. The umontreal.ssj.rng.RandomStream is stored internally.
In the current implementation, the method randomize(PointSet) simply calls addRandomShift(stream). This may change in the future. This class can be used as a base class to implement a specific randomization by overriding randomize(PointSet).
Definition at line 43 of file RandomShift.java.
| umontreal.ssj.hups.RandomShift.RandomShift | ( | ) |
Empty constructor: No stream is passed here for the randomization; one must be passed later by setStream.
Pierre: Not sure if we should keep this; we always need a stream!
Definition at line 52 of file RandomShift.java.
| umontreal.ssj.hups.RandomShift.RandomShift | ( | RandomStream | stream | ) |
Constructor that sets the internal umontreal.ssj.rng.RandomStream to stream.
| stream | stream to use in the randomization |
Definition at line 61 of file RandomShift.java.
| RandomStream umontreal.ssj.hups.RandomShift.getStream | ( | ) |
Returns the internal umontreal.ssj.rng.RandomStream.
Implements umontreal.ssj.hups.PointSetRandomization.
Definition at line 92 of file RandomShift.java.
| void umontreal.ssj.hups.RandomShift.randomize | ( | PointSet | p | ) |
This method calls addRandomShift(stream).
*** WARNING: Here the randomization is stored in \texttt{p}, so one cannot have multiple randomizations for the same \texttt{p}. ***
| p | Point set to randomize |
Implements umontreal.ssj.hups.PointSetRandomization.
Reimplemented in umontreal.ssj.hups.LMScramble, umontreal.ssj.hups.LMScrambleShift, and umontreal.ssj.hups.SMScrambleShift.
Definition at line 74 of file RandomShift.java.
| void umontreal.ssj.hups.RandomShift.setStream | ( | RandomStream | stream | ) |
Sets the internal umontreal.ssj.rng.RandomStream to stream.
| stream | stream to use in the randomization |
Implements umontreal.ssj.hups.PointSetRandomization.
Definition at line 83 of file RandomShift.java.
| String umontreal.ssj.hups.RandomShift.toString | ( | ) |
Returns a descriptor of this object.
Reimplemented in umontreal.ssj.hups.LMScramble, umontreal.ssj.hups.LMScrambleShift, and umontreal.ssj.hups.SMScrambleShift.
Definition at line 99 of file RandomShift.java.