SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Protected Attributes | List of all members
RandomShift Class Reference

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

Inheritance diagram for RandomShift:
[legend]
Collaboration diagram for RandomShift:
[legend]

Public Member Functions

 RandomShift ()
 Empty constructor: No stream is passed here for the randomization; one must be passed later by setStream. More...
 
 RandomShift (RandomStream stream)
 Constructor that sets the internal umontreal.ssj.rng.RandomStream to stream. More...
 
void randomize (PointSet p)
 This method calls addRandomShift(stream). More...
 
void setStream (RandomStream stream)
 Sets the internal umontreal.ssj.rng.RandomStream to stream. More...
 
RandomStream getStream ()
 Returns the internal umontreal.ssj.rng.RandomStream. More...
 
String toString ()
 Returns a descriptor of this object.
 

Protected Attributes

RandomStream stream
 

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).

Constructor & Destructor Documentation

◆ RandomShift() [1/2]

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!

◆ RandomShift() [2/2]

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

Parameters
streamstream to use in the randomization

Member Function Documentation

◆ getStream()

RandomStream getStream ( )

Returns the internal umontreal.ssj.rng.RandomStream.

Returns
stream used in the randomization

Implements PointSetRandomization.

◆ randomize()

void randomize ( PointSet  p)

This method calls addRandomShift(stream).

Parameters
pPoint set to randomize

Implements PointSetRandomization.

◆ setStream()

void setStream ( RandomStream  stream)

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

Parameters
streamstream to use in the randomization

Implements PointSetRandomization.


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