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

This PointSetRandomization class provides the nested uniform scrambling (NUS) randomization proposed by Owen ([185], [189]) for digital nets. More...

Inheritance diagram for umontreal.ssj.hups.NestedUniformScrambling:
umontreal.ssj.hups.PointSetRandomization

Public Member Functions

 NestedUniformScrambling ()
 Empty constructor.
 NestedUniformScrambling (RandomStream stream)
 Same as NestedUniformScrambling (stream, 0).
 NestedUniformScrambling (RandomStream stream, int numBits)
 Create a NestedUniformScrambling instance, using stream as the source of randomness, and randomizing only the first numBits output bits of the underlying DigitalNetBase2.
RandomStream getStream ()
 Returns the internal umontreal.ssj.rng.RandomStream.
void setStream (RandomStream stream)
 Sets the internal umontreal.ssj.rng.RandomStream to stream.
void setNumBits (int numBits)
 Set the number of bits to randomize to numBits.
void randomize (PointSet p)
 Scrambles the points of the DigitalNetBase2 contained in the CachedPointSet p and caches the scrambled points in p.
String toString ()
 Returns a descriptor of this object.

Detailed Description

This PointSetRandomization class provides the nested uniform scrambling (NUS) randomization proposed by Owen ([185], [189]) for digital nets.

Since the scrambled points are all stored explicitly, it can only be applied to a CachedPointSet that contains a DigitalNetBase2. The proper way to use it is to construct a CachedPointSet p that contains the digital net, and call NestedUniformScrambling.randomize(p) to randomize. The actual implementation is in DigitalNetBase2.nestedUniformScramble().

Note that calling CachedPointSet.randomize() with an instance of NestedUniformScrambling as its arguments will not work, because CachedPointSet.randomize() calls randomize() on its reference point set (the digital net) whereas NUS should modify the cached values instead.

Definition at line 44 of file NestedUniformScrambling.java.

Constructor & Destructor Documentation

◆ NestedUniformScrambling() [1/3]

umontreal.ssj.hups.NestedUniformScrambling.NestedUniformScrambling ( )

Empty constructor.

Definition at line 52 of file NestedUniformScrambling.java.

◆ NestedUniformScrambling() [2/3]

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

Same as NestedUniformScrambling (stream, 0).

Parameters
streamstream to use for the randomization

Definition at line 61 of file NestedUniformScrambling.java.

◆ NestedUniformScrambling() [3/3]

umontreal.ssj.hups.NestedUniformScrambling.NestedUniformScrambling ( RandomStream stream,
int numBits )

Create a NestedUniformScrambling instance, using stream as the source of randomness, and randomizing only the first numBits output bits of the underlying DigitalNetBase2.

Parameters
streamstream to use in the randomization
numBitsnumber of output bits to scramble (it can be smaller than, equal to or larger than the number of output bits in the DigitalNetBase2). If this parameter is zero, outDigits bits will be scrambled (up to 31 bits).

Definition at line 76 of file NestedUniformScrambling.java.

Member Function Documentation

◆ getStream()

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

Returns the internal umontreal.ssj.rng.RandomStream.

Returns
stream used in the randomization

Implements umontreal.ssj.hups.PointSetRandomization.

Definition at line 81 of file NestedUniformScrambling.java.

◆ randomize()

void umontreal.ssj.hups.NestedUniformScrambling.randomize ( PointSet p)

Scrambles the points of the DigitalNetBase2 contained in the CachedPointSet p and caches the scrambled points in p.

This p must be a CachedPointSet of a DigitalNetBase2.

Parameters
pPoint set to randomize

Implements umontreal.ssj.hups.PointSetRandomization.

Definition at line 103 of file NestedUniformScrambling.java.

◆ setNumBits()

void umontreal.ssj.hups.NestedUniformScrambling.setNumBits ( int numBits)

Set the number of bits to randomize to numBits.

Definition at line 92 of file NestedUniformScrambling.java.

◆ setStream()

void umontreal.ssj.hups.NestedUniformScrambling.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 85 of file NestedUniformScrambling.java.

◆ toString()

String umontreal.ssj.hups.NestedUniformScrambling.toString ( )

Returns a descriptor of this object.

Definition at line 118 of file NestedUniformScrambling.java.


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