static double[] sortAndRevert(final double[] array) {
		final int[] indexes = ProxySorter.sort(array);

		// Copy the elements in reversed order.
		final double[] result = new double[array.length];
		for (int i = 0; i < result.length; ++i) {
			result[indexes[i]] = array[indexes[result.length - 1 - i]];
		}

		return result;
	}
This method takes the probabilities from the
{@link #probabilities(Seq, int)} method and inverts it if needed.

@param population The population.
@param count The number of phenotypes to select.
@param opt Determines whether the individuals with higher fitness values
       or lower fitness values must be selected. This parameter
       determines whether the GA maximizes or minimizes the fitness
       function.
@return Probability array.
jenetics/src/main/java/io/jenetics/ProbabilitySelector.java