Interface RandomLongGenerator

All Superinterfaces:
RandomNumberGenerator, Seedable
All Known Subinterfaces:
LinearCongruentialGenerator
All Known Implementing Classes:
CompositeLinearCongruentialGenerator, ConcurrentCachedRLG, LEcuyer, Lehmer, MersenneTwister, MRG, MWC8222, SHR0, SHR3, ThreadIDRLG, UniformRNG

public interface RandomLongGenerator extends RandomNumberGenerator
A (pseudo) random number generator that generates a sequence of longs that lack any pattern and are uniformly distributed.

By default, an implementation of RandomLongGenerator is not thread-safe, and thus should not be shared among multiple threads. If a RandomLongGenerator instance is used in a multi-threaded program, for example, use

RandomLongGenerator uniform = RandomNumberGenerators.synchronizedRLG(new MersenneTwister());
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the next random long.

    Methods inherited from interface dev.nm.stat.random.rng.univariate.RandomNumberGenerator

    nextDouble

    Methods inherited from interface dev.nm.stat.random.Seedable

    seed
  • Method Details

    • nextLong

      long nextLong()
      Get the next random long.
      Returns:
      the next random long