Pareto { public static <T> ISeq<Vec<T>> front(final BaseSeq<? extends Vec<T>> set) { return front(set, Vec::dominance); } private  Pareto(); static double[] crowdingDistance(final BaseSeq<? extends Vec<T>> set); static double[] crowdingDistance(
		final BaseSeq<? extends T> set,
		final ElementComparator<? super T> comparator,
		final ElementDistance<? super T> distance,
		final ToIntFunction<? super T> dimension
	); static int[] rank(final BaseSeq<? extends Vec<T>> set); static int[] rank(
		final BaseSeq<? extends T> set,
		final Comparator<? super T> dominance
	); static ISeq<Vec<T>> front(final BaseSeq<? extends Vec<T>> set); static ISeq<T> front(
		final BaseSeq<? extends T> set,
		final Comparator<? super T> dominance
	); static int dominance(final C[] u, final C[] v); static int dominance(final T[] u, final T[] v, final Comparator<? super T> comparator); static int dominance(final int[] u, final int[] v); static int dominance(final long[] u, final long[] v); static int dominance(final double[] u, final double[] v); static int dominance(
		final V u,
		final V v,
		final int dimensions,
		final ElementComparator<? super V> comparator
	);  }
@Test(invocationCount = 20) public void frontMax() { final Random random = new Random(); final ISeq<Vec<double[]>> rank0 = frontMax(20, 50, random); final ISeq<Vec<double[]>> rank1 = frontMax(15, 50, random); final ISeq<Vec<double[]>> rank2 = frontMax(10, 50, random); final ISeq<Vec<double[]>> rank3 = frontMax(5, 50, random); final ISeq<Vec<double[]>> rank4 = frontMax(1, 25, random); final ISeq<Vec<double[]>> points = rank0 .append(rank1) .append(rank2) .append(rank3) .append(rank4) .copy().shuffle().toISeq(); final ISeq<Vec<double[]>> front = Pareto.front(points); Assert.assertEquals(new HashSet<>(front.asList()), new HashSet<>(rank0.asList())); }