Package org.uma.jmetal.util.comparator
Class EqualSolutionsComparator<S extends Solution<?>>
java.lang.Object
org.uma.jmetal.util.comparator.EqualSolutionsComparator<S>
- All Implemented Interfaces:
Serializable,Comparator<S>
public class EqualSolutionsComparator<S extends Solution<?>>
extends Object
implements Comparator<S>, Serializable
This class implements a
Comparator (a method for comparing
Solution objects) based whether all the objective values are
equal or not. A dominance test is applied to decide about what solution
is the best.- Author:
- Antonio J. Nebro
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods 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
-
EqualSolutionsComparator
public EqualSolutionsComparator()
-
-
Method Details
-
compare
Compares two solutions.- Specified by:
comparein interfaceComparator<S extends Solution<?>>- Parameters:
solution1- FirstSolution.solution2- SecondSolution.- Returns:
- -1, or 0, or 1, or 2 if solution1 is dominates solution2, solution1 and solution2 are equals, or solution1 is greater than solution2, respectively.
-