Documentation of 'umontreal.iro.lecuyer.rng.RandomStreamManager' Java class
RandomStreamManager
umontreal.iro.lecuyer.rng

Class RandomStreamManager



  • public class RandomStreamManager
    extends java.lang.Object
    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).

    • Constructor Detail

      • RandomStreamManager

        public RandomStreamManager()
    • Method Detail

      • add

        public RandomStream add(RandomStream stream)
        Adds the given stream to the internal list of this random stream manager and returns the added stream.
        Parameters:
        stream - the stream being added.
        Returns:
        the added stream.
        Throws:
        java.lang.NullPointerException - if stream is null.
      • remove

        public boolean 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:
        stream - the stream being removed.
        Returns:
        the success indicator of the operation.
      • clear

        public void clear()
        Removes all the streams from the internal list of this random stream manager.
      • getStreams

        public java.util.List getStreams()
        Returns an unmodifiable list containing all the random streams in this random stream manager. The returned list, constructed by unmodifiableList, can be assumed to contain non-null RandomStream instances.
        Returns:
        the list of managed random streams.
      • resetStartStream

        public void resetStartStream()
        Forwards to the resetStartStream methods of all streams in the list.
      • resetStartSubstream

        public void resetStartSubstream()
        Forwards to the resetStartSubstream methods of all streams in the list.
      • resetNextSubstream

        public void resetNextSubstream()
        Forwards to the resetNextSubstream methods of all streams in the list.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.