Class LaggedFibonacci

  • All Implemented Interfaces:
    RandomGenerator

    public final class LaggedFibonacci
    extends java.lang.Object
    implements RandomGenerator
    The additive lagged Fibonacci random number generator.
    • Constructor Summary

      Constructors 
      Constructor Description
      LaggedFibonacci()
      Constructs an additive lagged Fibonacci random number generator with the default (zero) seed.
      LaggedFibonacci​(int seed)
      Constructs an additive lagged Fibonacci random number generator with the given seed.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int next()
      Returns the next random integer number.
      void seed​(int seed)
      Sets the seed of the random number generator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LaggedFibonacci

        public LaggedFibonacci()
        Constructs an additive lagged Fibonacci random number generator with the default (zero) seed.
      • LaggedFibonacci

        public LaggedFibonacci​(int seed)
        Constructs an additive lagged Fibonacci random number generator with the given seed.
        Parameters:
        seed - the seed to be set.
    • Method Detail

      • seed

        public void seed​(int seed)
        Description copied from interface: RandomGenerator
        Sets the seed of the random number generator.
        Specified by:
        seed in interface RandomGenerator
        Parameters:
        seed - the seed to be set.
      • next

        public int next()
        Description copied from interface: RandomGenerator
        Returns the next random integer number.
        Specified by:
        next in interface RandomGenerator
        Returns:
        the random int.