StdRandom { public static void shuffle(Object[] a) { int N = a.length; for (int i = 0; i < N; i++) { int r = i + uniform(N - i); Object temp = a[i]; a[i] = a[r]; a[r] = temp; } } private  StdRandom(); static void setSeed(long seed); static double uniform(); static double random(); static int uniform(int N); static int uniform(int a, int b); static double uniform(double a, double b); static boolean bernoulli(double p); static boolean bernoulli(); static double gaussian(); static double gaussian(double mean, double stddev); static int geometric(double p); static int poisson(double lambda); static double pareto(double alpha); static double cauchy(); static int discrete(double[] a); static double exp(double lambda); static void shuffle(Object[] a); static void shuffle(double[] a); static void shuffle(int[] a); static void shuffle(Object[] a, int lo, int hi); static void shuffle(double[] a, int lo, int hi); static void shuffle(int[] a, int lo, int hi);  }
@Test public void testShuffle_1() throws Exception { double[] a = new double[] { 1.0 }; StdRandom.shuffle(a); }
@Test public void testShuffle_2() throws Exception { double[] a = new double[] {}; StdRandom.shuffle(a); }
@Test public void testShuffle_3() throws Exception { int[] a = new int[] { 1 }; StdRandom.shuffle(a); }
@Test public void testShuffle_4() throws Exception { int[] a = new int[] {}; StdRandom.shuffle(a); }
@Test public void testShuffle_5() throws Exception { Object[] a = new Object[] { new Object() }; StdRandom.shuffle(a); }
@Test public void testShuffle_6() throws Exception { Object[] a = new Object[] {}; StdRandom.shuffle(a); }