Class IntegerVariableComparator

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

public class IntegerVariableComparator extends Object implements Comparator<IntegerSolution>
  • Constructor Details

    • IntegerVariableComparator

      public IntegerVariableComparator()
    • IntegerVariableComparator

      public IntegerVariableComparator(int variableIndex)
  • Method Details

    • compare

      public int compare(IntegerSolution solution1, IntegerSolution solution2)
      Compares two double solutions according to a variable value
      Specified by:
      compare in interface Comparator<IntegerSolution>
      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.