
MOEA Framework 2.12 API Specification 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.moeaframework.algorithm.single.LinearObjectiveComparator
public class LinearObjectiveComparator
The weighted linear aggregate function. By default, this method assumes equal weights for all objectives.
Constructor Summary  

LinearObjectiveComparator()
Constructs a new comparator using a weighted linear aggregate function. 

LinearObjectiveComparator(double... weights)
Constructs a new comparator using a weighted linear aggregate function. 
Method Summary  

static double 
calculateFitness(Solution solution,
double[] weights)
Computes the weighted linear aggregate fitness of the solution. 
int 
compare(Solution solution1,
Solution solution2)
Compares the two solutions using a dominance relation, returning 1 if solution1 dominates solution2 , 1 if
solution2 dominates solution1 , and 0 if the
solutions are nondominated. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Methods inherited from interface java.util.Comparator 

equals 
Constructor Detail 

public LinearObjectiveComparator()
public LinearObjectiveComparator(double... weights)
weights
 the weight vectorMethod Detail 

public int compare(Solution solution1, Solution solution2)
DominanceComparator
1
if solution1
dominates solution2
, 1
if
solution2
dominates solution1
, and 0
if the
solutions are nondominated.
compare
in interface Comparator<Solution>
compare
in interface DominanceComparator
solution1
 the first solutionsolution2
 the second solution
1
if solution1
dominates solution2
,
1
if solution2
dominates solution1
, and
0
if the solutions are nondominatedpublic static double calculateFitness(Solution solution, double[] weights)
solution
 the solutionweights
 the weight vector

MOEA Framework 2.12 API Specification 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 