Package com.seedfinding.latticg.util
Class LCG
- java.lang.Object
-
- com.seedfinding.latticg.util.LCG
-
public class LCG extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description long
addend
static LCG
JAVA
long
modulus
long
multiplier
-
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
-
-
Method Detail
-
nextSeed
public long nextSeed(long seed)
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-