public abstract class OptimizationHelper
extends java.lang.Object
Constructor and Description |
---|
OptimizationHelper() |
Modifier and Type | Method and Description |
---|---|
static int[] |
sortAndGetRanks(double[] x,
boolean descending)
Sort an array and return the original indices of the each value.
|
static int[] |
sortAndGetRanks(double[] x,
java.util.Comparator<java.lang.Double> comp)
Sort an array and return the original index of each member.
|
public static int[] sortAndGetRanks(double[] x, boolean descending)
x
- Array to be sorteddescending
- Whether to sort the list in descending orderpublic static int[] sortAndGetRanks(double[] x, java.util.Comparator<java.lang.Double> comp)
x
- Array to be sortedcomp
- How to compare entries in the array