org.knowceans.util
Class Cokus
java.lang.Object
org.knowceans.util.Cokus
public class Cokus
- extends java.lang.Object
Java version of the Mersenne Twister mt19937, based on Shawn Cokus's C
implementation. See
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html for details.
- Author:
- heinrich
Field Summary |
static long |
K
|
static int |
M
|
static int |
N
|
Constructor Summary |
Cokus()
|
Method Summary |
static long |
hiBit(long u)
|
static long |
loBit(long u)
|
static long |
loBits(long u)
|
static void |
main(java.lang.String[] args)
|
static long |
mixBits(long u,
long v)
|
static int |
rand()
|
static double |
randDouble()
|
static long |
randUint32()
|
static int |
reload()
reload the random number buffer |
static void |
seed(int seed)
Cokus versions/optimizations |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
N
public static int N
M
public static int M
K
public static long K
Cokus
public Cokus()
hiBit
public static long hiBit(long u)
loBit
public static long loBit(long u)
loBits
public static long loBits(long u)
mixBits
public static long mixBits(long u,
long v)
seed
public static void seed(int seed)
- Cokus versions/optimizations
reload
public static int reload()
- reload the random number buffer
- Returns:
rand
public static int rand()
randDouble
public static double randDouble()
randUint32
public static long randUint32()
main
public static void main(java.lang.String[] args)