SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.mcqmctools.anova.SplitStream Class Reference

Implements a random stream that mixes two input streams by using a coordinate mask. More...

Inheritance diagram for umontreal.ssj.mcqmctools.anova.SplitStream:
umontreal.ssj.rng.RandomStreamBase umontreal.ssj.rng.CloneableRandomStream umontreal.ssj.rng.RandomStream

Public Member Functions

 SplitStream (RandomStream stream, int nCache)
 Reads 2 * nCache values from a a stream and stores them for future use.
SplitStream clone ()
 Clones the current generator and return its copy.
void resetNextSubstream ()
 Reinitializes the stream to the beginning of its next substream:
void resetStartStream ()
 Reinitializes the stream to its initial state \(I_g\): \(C_g\) and \(B_g\) are set to \(I_g\).
void resetStartSubstream ()
 Reinitializes the stream to the beginning of its current substream:
String toString ()
 Returns a string containing the current state of this stream.
Public Member Functions inherited from umontreal.ssj.rng.RandomStreamBase
void increasedPrecision (boolean incp)
 After calling this method with incp = true, each call to the RNG (direct or indirect) for this stream will return a uniform random number with more bits of precision than what is returned by nextValue, and will advance the state of the stream by 2 steps instead of 1 (i.e., nextValue will be called twice for each random number).
double nextDouble ()
 Returns a uniform random number between 0 and 1 from the stream.
void nextArrayOfDouble (double[] u, int start, int n)
 Calls nextDouble n times to fill the array u.
int nextInt (int i, int j)
 Calls nextDouble once to create one integer between i and j.
void nextArrayOfInt (int i, int j, int[] u, int start, int n)
 Calls nextInt n times to fill the array u.
String formatState ()
 Use the toString method.
String formatStateFull ()
 Use the toStringFull method.

Protected Member Functions

double nextValue ()
 This method should return the next random number (between 0 and 1) from the current stream.

Detailed Description

Implements a random stream that mixes two input streams by using a coordinate mask.

Definition at line 10 of file SplitStream.java.

Constructor & Destructor Documentation

◆ SplitStream()

umontreal.ssj.mcqmctools.anova.SplitStream.SplitStream ( RandomStream stream,
int nCache )

Reads 2 * nCache values from a a stream and stores them for future use.

When nextValue() is called, a value is popped from the 2 * nCache cached values at even indices for the coordinates contained in the coordinate set coords, and at odd indices otherwise.

Definition at line 24 of file SplitStream.java.

Member Function Documentation

◆ clone()

SplitStream umontreal.ssj.mcqmctools.anova.SplitStream.clone ( )

Clones the current generator and return its copy.

Returns
A deep copy of the current generator

Reimplemented from umontreal.ssj.rng.RandomStreamBase.

Definition at line 37 of file SplitStream.java.

◆ nextValue()

double umontreal.ssj.mcqmctools.anova.SplitStream.nextValue ( )
protected

This method should return the next random number (between 0 and 1) from the current stream.

If the stream is set to the high precision mode (increasedPrecision(true) was called), then each call to nextDouble will call nextValue twice, otherwise it will call it only once.

Returns
a number in the interval (0,1)

Reimplemented from umontreal.ssj.rng.RandomStreamBase.

Definition at line 53 of file SplitStream.java.

◆ resetNextSubstream()

void umontreal.ssj.mcqmctools.anova.SplitStream.resetNextSubstream ( )

Reinitializes the stream to the beginning of its next substream:

\(N_g\) is computed, and \(C_g\) and \(B_g\) are set to \(N_g\).

Reimplemented from umontreal.ssj.rng.RandomStreamBase.

Definition at line 60 of file SplitStream.java.

◆ resetStartStream()

void umontreal.ssj.mcqmctools.anova.SplitStream.resetStartStream ( )

Reinitializes the stream to its initial state \(I_g\): \(C_g\) and \(B_g\) are set to \(I_g\).

Reimplemented from umontreal.ssj.rng.RandomStreamBase.

Definition at line 65 of file SplitStream.java.

◆ resetStartSubstream()

void umontreal.ssj.mcqmctools.anova.SplitStream.resetStartSubstream ( )

Reinitializes the stream to the beginning of its current substream:

\(C_g\) is set to \(B_g\).

Reimplemented from umontreal.ssj.rng.RandomStreamBase.

Definition at line 70 of file SplitStream.java.

◆ toString()

String umontreal.ssj.mcqmctools.anova.SplitStream.toString ( )

Returns a string containing the current state of this stream.

Returns
the state of the generator formated as a string

Reimplemented from umontreal.ssj.rng.RandomStreamBase.

Definition at line 75 of file SplitStream.java.


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