SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.hups.RandomShift Class Reference

This class implements a umontreal.ssj.hups.PointSetRandomization. More...

Inheritance diagram for umontreal.ssj.hups.RandomShift:
umontreal.ssj.hups.PointSetRandomization umontreal.ssj.hups.LMScramble umontreal.ssj.hups.LMScrambleShift umontreal.ssj.hups.SMScrambleShift

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ RandomShift() [1/2]

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.

◆ RandomShift() [2/2]

umontreal.ssj.hups.RandomShift.RandomShift ( RandomStream stream)

Constructor that sets the internal umontreal.ssj.rng.RandomStream to stream.

Parameters
streamstream to use in the randomization

Definition at line 61 of file RandomShift.java.

Member Function Documentation

◆ getStream()

RandomStream umontreal.ssj.hups.RandomShift.getStream ( )

Returns the internal umontreal.ssj.rng.RandomStream.

Returns
stream used in the randomization

Implements umontreal.ssj.hups.PointSetRandomization.

Definition at line 92 of file RandomShift.java.

◆ randomize()

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}. ***

Parameters
pPoint 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.

◆ setStream()

void umontreal.ssj.hups.RandomShift.setStream ( RandomStream stream)

Sets the internal umontreal.ssj.rng.RandomStream to stream.

Parameters
streamstream to use in the randomization

Implements umontreal.ssj.hups.PointSetRandomization.

Definition at line 83 of file RandomShift.java.

◆ toString()

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.


The documentation for this class was generated from the following file: