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

Manages a list of random streams for more convenient synchronization. More...

Public Member Functions

RandomStream add (RandomStream stream)
 Adds the given stream to the internal list of this random stream manager and returns the added stream.
boolean remove (RandomStream stream)
 Removes the given stream from the internal list of this random stream manager.
void clear ()
 Removes all the streams from the internal list of this random stream manager.
List getStreams ()
 Returns an unmodifiable list containing all the random streams in this random stream manager.
void resetStartStream ()
 Forwards to the umontreal.ssj.rng.RandomStream.resetStartStream methods of all streams in the list.
void resetStartSubstream ()
 Forwards to the umontreal.ssj.rng.RandomStream.resetStartSubstream methods of all streams in the list.
void resetNextSubstream ()
 Forwards to the umontreal.ssj.rng.RandomStream.resetNextSubstream methods of all streams in the list.

Detailed Description

Manages a list of random streams for more convenient synchronization.

All streams in the list can be reset simultaneously by a single call to the appropriate method of this stream manager, instead of calling explicitly the reset method for each individual stream.

After a random stream manager is constructed, any existing

RandomStream object can be registered to this stream manager (i.e., added to the list) and eventually unregistered (removed from the list).

Definition at line 45 of file RandomStreamManager.java.

Member Function Documentation

◆ add()

RandomStream umontreal.ssj.rng.RandomStreamManager.add ( RandomStream stream)

Adds the given stream to the internal list of this random stream manager and returns the added stream.

Parameters
streamthe stream being added.
Returns
the added stream.
Exceptions
NullPointerExceptionif `stream` is `null`.

Definition at line 57 of file RandomStreamManager.java.

◆ clear()

void umontreal.ssj.rng.RandomStreamManager.clear ( )

Removes all the streams from the internal list of this random stream manager.

Definition at line 81 of file RandomStreamManager.java.

◆ getStreams()

List umontreal.ssj.rng.RandomStreamManager.getStreams ( )

Returns an unmodifiable list containing all the random streams in this random stream manager.

The returned list, constructed by java.util.Collections.unmodifiableList, can be assumed to contain non-null RandomStream instances.

Returns
the list of managed random streams.

Definition at line 93 of file RandomStreamManager.java.

◆ remove()

boolean umontreal.ssj.rng.RandomStreamManager.remove ( RandomStream stream)

Removes the given stream from the internal list of this random stream manager.

Returns true if the stream was properly removed, false otherwise.

Parameters
streamthe stream being removed.
Returns
the success indicator of the operation.

Definition at line 74 of file RandomStreamManager.java.

◆ resetNextSubstream()

void umontreal.ssj.rng.RandomStreamManager.resetNextSubstream ( )

Forwards to the umontreal.ssj.rng.RandomStream.resetNextSubstream methods of all streams in the list.

Definition at line 119 of file RandomStreamManager.java.

◆ resetStartStream()

void umontreal.ssj.rng.RandomStreamManager.resetStartStream ( )

Forwards to the umontreal.ssj.rng.RandomStream.resetStartStream methods of all streams in the list.

Definition at line 101 of file RandomStreamManager.java.

◆ resetStartSubstream()

void umontreal.ssj.rng.RandomStreamManager.resetStartSubstream ( )

Forwards to the umontreal.ssj.rng.RandomStream.resetStartSubstream methods of all streams in the list.

Definition at line 110 of file RandomStreamManager.java.


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