RandomUtils { public static int[] perm(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = i; for (int i = 0; i < n; i++) { int r = i + (int) (Math.random() * (n - i)); int temp = a[i]; a[i] = a[r]; a[r] = temp; } return a; } private  RandomUtils(); static double uniform(double a, double b); static int uniform(int n); static boolean bernoulli(double p); static double gaussian(); static double gaussian(double mean, double stddev); static int discrete(double[] a); static double exp(double lambda); static int[] perm(int n); static void shuffle(String[] a); static LinkedList<Integer> getGaussian(int start, int end, int num, long factor,
                                                  double stdDeviation, double variance, double mean); static double getY(double x, double stdDeviation, double variance, double mean); static long uuid(); static String uuid2();  }
@Test public void permTest() { assertNotEquals("[9,0,8,3,5,7,2,10,4,1,6] ", JSON.toJSONString(perm(11))); }