/** * Constructor using an array of integers as seed. Your array must have a non-zero length. Only the first 624 integers in the * array are used; if the array is shorter than this then integers are repeatedly used in a wrap-around fashion. */ public MersenneTwisterFast(final int[] array) { setSeed(array); }
/** * Constructor using a given seed. Though you pass this seed in as a long, it's best to make sure it's actually an integer. * */ public MersenneTwisterFast(final long seed) { setSeed(seed); }
throw new IllegalArgumentException("Array length must be greater than zero"); int i, j, k; setSeed(19650218); i = 1; j = 0;