This method receives a normalized pareto front and return the inverted one.
This method is for minimization problems

@param front The pareto front to inverse
@return The inverted pareto front
199406
public static Front getInvertedFront(Front front) {
    if (front == null) {
      throw new NullFrontException();
    } else if (front.getNumberOfPoints() == 0) {
      throw new EmptyFrontException();
    }

    int numberOfDimensions = front.getPoint(0).getDimension() ;
    Front invertedFront = new ArrayFront(front.getNumberOfPoints(), numberOfDimensions);

    for (int i = 0; i < front.getNumberOfPoints(); i++) {
      for (int j = 0; j < numberOfDimensions; j++) {
        if (front.getPoint(i).getValue(j)  <= 1.0
            && front.getPoint(i).getValue(j) >= 0.0) {
          invertedFront.getPoint(i).setValue(j, 1.0 - front.getPoint(i).getValue(j));
        } else if (front.getPoint(i).getValue(j) > 1.0) {
          invertedFront.getPoint(i).setValue(j, 0.0) ;
        } else if (front.getPoint(i).getValue(j) < 0.0) {
          invertedFront.getPoint(i).setValue(j, 1.0) ;
        }
      }
    }
    return invertedFront;
  }
1283934
private Integer getToParameter(Map<String, String> parameters, Integer defaultValue)
        throws TransformationOperationException {
        return getSubStringParameter(parameters, toParam, defaultValue);
    }
166805
public final void inverse() {
		double norm;  

		norm = 1f/(this.w*this.w + this.x*this.x + this.y*this.y + this.z*this.z);
		this.w *=  norm;
		this.x *= -norm;
		this.y *= -norm;
		this.z *= -norm;
	}
178429
public static <K, V extends Comparable> Map<K, V> topNByValue(Map<K, V> map, final boolean reverse, int n) {
		return topNByValueInternal(map, n, reverse ? Ordering.from(new ComparableEntryValueComparator<K, V>()).reverse()
				: new ComparableEntryValueComparator<K, V>());
	}
765481
def solve_scalarization(n,c,t):
    

    model = base_model(n,c,t)   # base model for minimizing cost or time
    x,u,C,T = model.data

    def explore(C1,T1,C2,T2,front):
        """explore: recursively try to find new non-dominated solutions with a scaled objective
        Parameters:
            - C1,T1: cost and time of leftmost point
            - C1,T1: cost and time of rightmost point
            - front: current set of non-dominated solutions
        Returns the updated front
        """
        alpha = float(C1 - C2)/(T2 - T1)
        # print("%s,%s -- %s,%s  (%s)..." % (C1,T1,C2,T2,alpha)
        init = list(front)
        model.setObjective(quicksum((c[i,j] + alpha*t[i,j])*x[i,j] for (i,j) in x), "minimize")
        optimize(model,front)
        front = pareto_front(front)
        # print("... added %s points" % (len(front)-len(init))
        if front == init:
            # print("no points added, returning"
            return front

        CM = model.getVal(C)
        TM = model.getVal(T)
        # print("will explore %s,%s -- %s,%s and %s,%s -- %s,%s" % (C1,T1,CM,TM,CM,TM,C2,T2)
        if TM > T1:
            front = explore(C1,T1,CM,TM,front)
        if T2 > TM:
            front = explore(CM,TM,C2,T2,front)
        return front


    # store the set of solutions for plotting
    cand = []       # to store the set of solutions for plotting
    model.setObjective(T, "minimize")

    stat = optimize(model,cand)
    if stat != "optimal":
        return []
    C1 = model.getVal(C)
    T1 = model.getVal(T)

    # change the objective function to minimize the travel cost
    model.setObjective(C, "minimize")

    stat = optimize(model,cand)
    if stat != "optimal":
        return []
    C2 = model.getVal(C)
    T2 = model.getVal(T)

    front = pareto_front(cand)
    return explore(C1,T1,C2,T2,front)
1111399
public double getElevationAt( Direction direction ) {
        switch( direction ) {
        case E:
            return eElev;
        case W:
            return wElev;
        case N:
            return nElev;
        case S:
            return sElev;
        case EN:
            return enElev;
        case NW:
            return nwElev;
        case WS:
            return wsElev;
        case SE:
            return seElev;
        default:
            throw new IllegalArgumentException();
        }
    }
561048
public static <T, U> Collector<T, ?, Optional<T>> minBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) {
        return maxBy(function, comparator.reversed());
    }
963936
public boolean invert(int id) {
    switch (id) {
      case EVALUATION_CC:
      case EVALUATION_ACC:
      case EVALUATION_KAPPA:
      case EVALUATION_MATTHEWS_CC:
      case EVALUATION_PRECISION:
      case EVALUATION_WEIGHTED_PRECISION:
      case EVALUATION_RECALL:
      case EVALUATION_WEIGHTED_RECALL:
      case EVALUATION_AUC:
      case EVALUATION_WEIGHTED_AUC:
      case EVALUATION_PRC:
      case EVALUATION_WEIGHTED_PRC:
      case EVALUATION_FMEASURE:
      case EVALUATION_WEIGHTED_FMEASURE:
      case EVALUATION_TRUE_POSITIVE_RATE:
      case EVALUATION_TRUE_NEGATIVE_RATE:
        return true;
      default:
        return false;
    }
  }
918465
public double generationalDistance(Front front, Front referenceFront) {
    double sum = 0.0;
    for (int i = 0; i < front.getNumberOfPoints(); i++) {
      sum += Math.pow(FrontUtils.distanceToClosestPoint(front.getPoint(i),
          referenceFront), pow);
    }

    sum = Math.pow(sum, 1.0 / pow);

    return sum / front.getNumberOfPoints();
  }
359992
public List<? extends Solution<?>> normalize(List<? extends Solution<?>> solutionList) {
    Front normalizedFront ;
    if (solutionList == null) {
      throw new JMetalException("The front is null") ;
    }

    normalizedFront = getNormalizedFront(new ArrayFront(solutionList), maximumValues, minimumValues);

    return FrontUtils.convertFrontToSolutionList(normalizedFront) ;
  }
1267353
def Pareto(q, a, tag=None):
    
    assert q > 0 and a > 0, 'Pareto "q" and "a" must be positive scalars'
    p = Uniform(0, 1, tag)
    return a * (1 - p) ** (-1.0 / q)
390904
@Override public Double evaluate(List<S> solutionList) {
    if (solutionList == null) {
      throw new JMetalException("The pareto front approximation is null") ;
    }

    return invertedGenerationalDistancePlus(new ArrayFront(solutionList), referenceParetoFront);
  }
600655
def front(self, *fields):
        ''''''
        ts = self.irange(0, 0, fields=fields)
        if ts:
            return ts.start(), ts[0]
109986
public static int invertedCompare(Solution s1, Solution s2) {
      int flag = InvertedCompareUtils.ConstraintCompare(s1, s2);

      if (flag == 0)
      {
         flag = InvertedCompareUtils.ParetoObjectiveCompare(s1, s2);
      }
      return flag;
   }
733624
def inverse(self):
        
        result = G1Element()
        librelic.g1_neg_abi(byref(result), byref(self))
        return result
1107358
public static <K, V> Map<V, K> inverse(Map<K, V> map) {
        return inverse(map, false);
    }
806722
@Override
    public Tensor forward() {
        Tensor x = modIn.getOutput();
        y = new Tensor(s, 1);
        y.setValue(0, x.getSum());
        return y;
    }