@Test public void compatibility() { for (int i = 1; i <= 1000; ++i) { int[] sub1 = subset(1000, new int[i], new Random(123)); int[] sub2 = new int[i]; Combinatorics.subset(1000, sub2, new Random(123)); Assert.assertTrue(Arrays.equals(sub2, sub1), "K: " + i); } }
public static int[] subset(final int n, final int k) { return subset(n, k, RandomRegistry.random()); }
Combinatorics { public static int[] subset(final int n, final int k) { return subset(n, k, RandomRegistry.random()); } }
Combinatorics { public static int[] subset(final int n, final int k) { return subset(n, k, RandomRegistry.random()); } private  Combinatorics(); }
Combinatorics { public static int[] subset(final int n, final int k) { return subset(n, k, RandomRegistry.random()); } private  Combinatorics(); static int[] subset(final int n, final int k); static int[] subset(final int n, final int k, final Random random); static int[] subset(final int[] set, final int k); static int[] subset(final int[] set, final int k, final Random random); static int[] subset(final int n, final int[] sub); static int[] subset(final int n, final int[] a, final Random random); static void checkSubSet(final int n, final int k); }
Combinatorics { public static int[] subset(final int n, final int k) { return subset(n, k, RandomRegistry.random()); } private  Combinatorics(); static int[] subset(final int n, final int k); static int[] subset(final int n, final int k, final Random random); static int[] subset(final int[] set, final int k); static int[] subset(final int[] set, final int k, final Random random); static int[] subset(final int n, final int[] sub); static int[] subset(final int n, final int[] a, final Random random); static void checkSubSet(final int n, final int k);  }