Class ParetoObjectiveComparator
java.lang.Object
org.moeaframework.core.comparator.ParetoObjectiveComparator
- All Implemented Interfaces:
DominanceComparator
Compares two solutions using the Pareto dominance relation on the objectives.
In general, the ParetoDominanceComparator should be used instead as it also incorporates constraint
violation checks.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ParetoObjectiveComparator
public ParetoObjectiveComparator()Constructs a Pareto dominance comparator.
-
-
Method Details
-
compare
Description copied from interface:DominanceComparatorCompares the two solutions using a dominance relation, returning-1ifsolution1dominatessolution2,1ifsolution2dominatessolution1, and0if the solutions are non-dominated.- Specified by:
comparein interfaceDominanceComparator- Parameters:
solution1- the first solutionsolution2- the second solution- Returns:
-1ifsolution1dominatessolution2,1ifsolution2dominatessolution1, and0if the solutions are non-dominated
-