Package org.uma.jmetal.util.comparator
Class HypervolumeContributionComparator<S extends Solution<?>>
java.lang.Object
org.uma.jmetal.util.comparator.HypervolumeContributionComparator<S>
- All Implemented Interfaces:
Serializable,Comparator<S>
public class HypervolumeContributionComparator<S extends Solution<?>>
extends Object
implements Comparator<S>, Serializable
Compares two solutions according to the crowding distance attribute. The higher
the distance the better
- 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
-
HypervolumeContributionComparator
public HypervolumeContributionComparator()
-
-
Method Details
-
compare
Compare two solutions.- Specified by:
comparein interfaceComparator<S extends Solution<?>>- Parameters:
solution1- Object representing the firstSolution.solution2- Object representing the secondSolution.- Returns:
- -1, or 0, or 1 if solution1 has lower, equal, or higher contribution value than solution2, respectively.
-