package org.uma.jmetal.util;

public class VectorUtil {
}

@@ -49,10 +49,980 @@
 rUtil %7B%0A
+  /**%0A   * Method that apply a dominance test between two vectors. It is assumed that the vectors have%0A   * been properly tested before calling this method to ensure that they have the same length%0A   *%0A   * @param vector1%0A   * @param vector2%0A   * @return 0 if the vectors are non-dominated, -1 if vector1 dominates vector2, and 1 if vector2%0A   *     dominates vector 1%0A   */%0A  public static int dominanceTest(double%5B%5D vector1, double%5B%5D vector2) %7B%0A    int bestIsOne = 0;%0A    int bestIsTwo = 0;%0A    int result;%0A    for (int i = 0; i %3C vector1.length; i++) %7B%0A      double value1 = vector1%5Bi%5D;%0A      double value2 = vector2%5Bi%5D;%0A      if (value1 != value2) %7B%0A        if (value1 %3C value2) %7B%0A          bestIsOne = 1;%0A        %7D%0A        if (value2 %3C value1) %7B%0A          bestIsTwo = 1;%0A        %7D%0A      %7D%0A    %7D%0A    if (bestIsOne %3E bestIsTwo) %7B%0A      result = -1;%0A    %7D else if (bestIsTwo %3E bestIsOne) %7B%0A      result = 1;%0A    %7D else %7B%0A      result = 0;%0A    %7D%0A    return result;%0A  %7D%0A
 %7D%0A

Add class VectorUtil