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 invalid input: '<'antonio@lcc.uma.es>
See Also:
  • Constructor Details

    • HypervolumeContributionComparator

      public HypervolumeContributionComparator()
  • Method Details

    • compare

      public int compare(S solution1, S solution2)
      Compare two solutions.
      Specified by:
      compare in interface Comparator<S extends Solution<?>>
      Parameters:
      solution1 - Object representing the first Solution.
      solution2 - Object representing the second Solution.
      Returns:
      -1, or 0, or 1 if solution1 is has lower, equal, or higher contribution value than solution2, respectively.