Class DX120Generator

java.lang.Object
nl.tudelft.simulation.jstats.streams.RandomNumberGenerator
nl.tudelft.simulation.jstats.streams.DX120Generator
All Implemented Interfaces:
Serializable, StreamInterface

public class DX120Generator extends RandomNumberGenerator
The DX-120-4 pseudo random number generator. This generator is described in A System of High-dimensional, Efficient, Long-cycle and Portable Uniform Random Number Generators .

Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Alexander Verbraeck, Peter Jacobs
See Also:
  • Constructor Details

    • DX120Generator

      public DX120Generator()
      constructs a new LC48Generator. the seed value used equals System.currentTimeMillis()
    • DX120Generator

      public DX120Generator(long seed)
      constructs a new LC48Generator.
      Parameters:
      seed - long; the seed
  • Method Details

    • next

      public long next(int bits)
      returns the next value in the stream.
      Specified by:
      next in class RandomNumberGenerator
      Parameters:
      bits - int; the number of bits used
      Returns:
      the next value.
    • setSeed

      public void setSeed(long seed)
      Set the seed of the generator.
      Specified by:
      setSeed in interface StreamInterface
      Specified by:
      setSeed in class RandomNumberGenerator
      Parameters:
      seed - long; the new seed