@Override
	public int size() {
		return _population.size();
	}
Trims {@code this} pareto front to the given size. The front elements are
sorted according to its crowding distance, and the elements which have
smaller distance to its neighbors are removed first.

{@snippet lang="java":
final ParetoFront<Vec<double[]>> front = new ParetoFront<>(Vec::dominance);
front.trim(10, Vec::compare, Vec::distance, Vec::length);
}
The example above reduces the given front to 10 elements.

@param size the number of front elements after the trim. If
       {@code size() <= size}, nothing is trimmed.
@param comparator the element comparator used for calculating the
       crowded distance
@param distance the element distance measure
@param dimension the number of vector elements of {@code T}
@return {@code this} trimmed pareto front
@throws NullPointerException if one of the objects is {@code null}
jenetics.ext/src/main/java/io/jenetics/ext/moea/ParetoFront.java