@Test public void testNextInt() { RandomDataGenerator random1 = new RandomDataGenerator(new MersenneTwister(123)); RandomDataGenerator random2 = new RandomDataGenerator(new MersenneTwister(123)); assertEquals(random1.nextInt(12, 19), RandomUtils.nextInt(12, 19, random2)); assertEquals(random1.nextInt(120, 129), RandomUtils.nextInt(120, 129, random2)); assertEquals(120, RandomUtils.nextInt(120, 120, random2)); assertEquals(0, RandomUtils.nextInt(0, 0, random2)); }
public static int nextInt(int lower, int upper, RandomDataGenerator random) { return lower == upper ? lower : random.nextInt(lower, upper); }
RandomUtils { public static int nextInt(int lower, int upper, RandomDataGenerator random) { return lower == upper ? lower : random.nextInt(lower, upper); } }
RandomUtils { public static int nextInt(int lower, int upper, RandomDataGenerator random) { return lower == upper ? lower : random.nextInt(lower, upper); }  }
RandomUtils { public static int nextInt(int lower, int upper, RandomDataGenerator random) { return lower == upper ? lower : random.nextInt(lower, upper); }  static List<T> sample(List<T> items, int m, RandomDataGenerator random); static List<T> sampleMore(List<T> items, int m, RandomDataGenerator random); static List<T> sample(List<T> items, int m, Set<T> forbidden, RandomDataGenerator random); static List<T> sampleWithReplacement(List<T> items, int m, RandomDataGenerator random); static int[] shuffleInts(int[] ar, RandomDataGenerator random); static List<T> shuffle(List<T> items, RandomDataGenerator random); static List<T> randomSampleViaShuffle(Iterable<T> items, int sampleSize, RandomDataGenerator random); static int nextInt(int lower, int upper, RandomDataGenerator random); static double nextUniform(double lower, double upper, RandomDataGenerator random); static T pickRandom(List<T> items, RandomDataGenerator random); static int pickRandom(int[] arr, RandomDataGenerator random); static T pickRandom(T[] arr, RandomDataGenerator random); static double[] randomDoubleVector(int n, double minValue, double maxValue, RandomDataGenerator random); static float[] nextFloatVector(int n, float minValue, float maxValue, RandomDataGenerator random); static int sampleAccordingToDistribution(RandomDataGenerator random, double[] probabilities); }
RandomUtils { public static int nextInt(int lower, int upper, RandomDataGenerator random) { return lower == upper ? lower : random.nextInt(lower, upper); }  static List<T> sample(List<T> items, int m, RandomDataGenerator random); static List<T> sampleMore(List<T> items, int m, RandomDataGenerator random); static List<T> sample(List<T> items, int m, Set<T> forbidden, RandomDataGenerator random); static List<T> sampleWithReplacement(List<T> items, int m, RandomDataGenerator random); static int[] shuffleInts(int[] ar, RandomDataGenerator random); static List<T> shuffle(List<T> items, RandomDataGenerator random); static List<T> randomSampleViaShuffle(Iterable<T> items, int sampleSize, RandomDataGenerator random); static int nextInt(int lower, int upper, RandomDataGenerator random); static double nextUniform(double lower, double upper, RandomDataGenerator random); static T pickRandom(List<T> items, RandomDataGenerator random); static int pickRandom(int[] arr, RandomDataGenerator random); static T pickRandom(T[] arr, RandomDataGenerator random); static double[] randomDoubleVector(int n, double minValue, double maxValue, RandomDataGenerator random); static float[] nextFloatVector(int n, float minValue, float maxValue, RandomDataGenerator random); static int sampleAccordingToDistribution(RandomDataGenerator random, double[] probabilities);  }