public long getIthLong(long i) { final LocalRandom localRandom = r.get(); localRandom.setSeed(seed * BIG_PRIME + i * SMALL_PRIME); return localRandom.nextLong(); }
/** * Returns the i'th pseudorandom, uniformly distributed {@code double} value between {@code 0.0} * and {@code 1.0} from this random number generator's sequence. * * @param i * @return */ public double getIthDouble(long i) { LocalRandom localRandom = r.get(); localRandom.setSeed(seed * BIG_PRIME + i * SMALL_PRIME); return localRandom.nextDouble(); }
public int getIthPositiveInteger(long i) { final LocalRandom localRandom = r.get(); localRandom.setSeed(seed * BIG_PRIME + i * SMALL_PRIME); return Math.abs(localRandom.nextInt()); }