Class Pareto

java.lang.Object
com.eqixiac.equinix.design.solve.Pareto

public final class Pareto extends Object
Pareto dominance over rows of objective values. Row a dominates row b when a is at least as good on every objective and strictly better on at least one. An unknown value (Double.NaN) counts as worse than any known value and equal to another unknown, so an option is never promoted for lacking data.
  • Method Details

    • dominates

      public static boolean dominates(double[] a, double[] b, Direction[] directions)
      Parameters:
      a - one row of values, one per objective
      b - another row
      directions - the direction of each objective, same length as the rows
      Returns:
      whether a dominates b
    • frontier

      public static List<Integer> frontier(List<double[]> rows, Direction[] directions)
      Finds the rows no other row dominates. Rows with identical values are all kept.
      Parameters:
      rows - the value rows
      directions - the direction of each objective
      Returns:
      the indexes of the non-dominated rows, ascending