Class LCG


  • public class LCG
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      LCG​(long multiplier, long addend, long modulus)  
    • Field Detail

      • JAVA

        public static final LCG JAVA
      • multiplier

        public final long multiplier
      • addend

        public final long addend
      • modulus

        public final long modulus
    • Constructor Detail

      • LCG

        public LCG​(long multiplier,
                   long addend,
                   long modulus)
    • Method Detail

      • nextSeed

        public long nextSeed​(long seed)
      • combine

        public LCG combine​(LCG other)
      • combine

        public LCG combine​(long steps)
      • invert

        public LCG invert()
      • mod

        public long mod​(long n)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object