TinyMT Java Implementation

READ ME FIRST

We introduce TinyMT implemented in Java. TinyMT32, TinyMT64 and ThreadLocalRandom classes are provided.

CAUTION: All three classes are not thread safe. The three classes do not inherit java.util.Random, because Random is designed to be thread safe. The three classes implement the interface, org.apache.commons.math.random.RandomGenerator.

There are 65536 parameters for each TinyMT32 and TinyMT64 in resource. ThreadLocalRandom uses TinyMT32 with parameters different from above parameters.

The jump method is provided.

Requirement

The following environment are required to compile and execute this program.

Sample

import jp.ac.hiroshima_u.sci.math.saito.tinymt.TinyMT32;

public class Test {
    public static void main(String[] args) {
        TinyMT32 tiny = TinyMT32.getDefault(args[0]);
	for (int i = 0; i < 10; i++) {
	    for (int j = 0; j < 5; j++) {
		System.out.print(String.format("%08x ", tiny.nextInt()));
	    }
	    System.out.println();
	}
    }
}

License

see LICENSE.txt.