Class ModifiedLaggedFibonacci

  • All Implemented Interfaces:
    RandomGenerator

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

      Constructors 
      Constructor Description
      ModifiedLaggedFibonacci()
      Constructs a modified additive lagged Fibonacci random number generator with the default (zero) seed.
      ModifiedLaggedFibonacci​(int seed)
      Constructs a modified 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

      • ModifiedLaggedFibonacci

        public ModifiedLaggedFibonacci()
        Constructs a modified additive lagged Fibonacci random number generator with the default (zero) seed.
      • ModifiedLaggedFibonacci

        public ModifiedLaggedFibonacci​(int seed)
        Constructs a modified 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.