Package org.uma.jmetal.util.comparator
Class IntegerVariableComparator
java.lang.Object
org.uma.jmetal.util.comparator.IntegerVariableComparator
- All Implemented Interfaces:
Comparator<IntegerSolution>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(IntegerSolution solution1, IntegerSolution solution2) Compares two double solutions according to a variable valueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
IntegerVariableComparator
public IntegerVariableComparator() -
IntegerVariableComparator
public IntegerVariableComparator(int variableIndex)
-
-
Method Details
-
compare
Compares two double solutions according to a variable value- Specified by:
comparein interfaceComparator<IntegerSolution>- Parameters:
solution1- Object representing the firstSolution.solution2- Object representing the secondSolution.- Returns:
- -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
-