Class DoubleVariableComparator

java.lang.Object
org.uma.jmetal.util.comparator.DoubleVariableComparator
All Implemented Interfaces:
Comparator<DoubleSolution>

public class DoubleVariableComparator extends Object implements Comparator<DoubleSolution>
  • Constructor Details

    • DoubleVariableComparator

      public DoubleVariableComparator()
    • DoubleVariableComparator

      public DoubleVariableComparator(int variableIndex)
  • Method Details

    • compare

      public int compare(DoubleSolution solution1, DoubleSolution solution2)
      Compares two double solutions according to a variable value
      Specified by:
      compare in interface Comparator<DoubleSolution>
      Parameters:
      solution1 - Object representing the first Solution.
      solution2 - Object representing the second Solution.
      Returns:
      -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.