Class MersenneTwister

    • Constructor Detail

      • MersenneTwister

        public MersenneTwister()
        constructs a new Mersenne Twister. System.currentTimeMillis() is used as seed value.
      • MersenneTwister

        public MersenneTwister​(long seed)
        Constructor using a given seed.
        Parameters:
        seed - long; The initial seed.
    • Method Detail

      • 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.