Documentation API of the 'umontreal.iro.lecuyer.rng.RandomStreamWithCache' Java class

Class RandomStreamWithCache

  • All Implemented Interfaces:

    public class RandomStreamWithCacheextends Objectimplements RandomStream
    This class represents a random stream whose uniforms are cached for more efficiency when using common random numbers. An object from this class is constructed with a reference to a RandomStream instance used to get the random numbers. These numbers are stored in an internal array to be retrieved later. The dimension of the array increases as the values are generated. If the nextDouble method is called after the object is reset, it gives back the cached values instead of computing new ones. If the cache is exhausted before the stream is reset, new values are computed, and added to the cache.

    Such caching allows for a better performance with common random numbers, when generating uniforms is time-consuming. It can also help with restoring the simulation to a certain state without setting stream-specific seeds. However, using such caching may lead to memory problems if a large quantity of random numbers are needed.

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.