|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jmetal.util.comparators.ObjectiveComparator
public class ObjectiveComparator
This class implements a Comparator
(a method for comparing
Solution
objects) based on a objective values.
Constructor Summary | |
---|---|
ObjectiveComparator(int nObj)
Constructor. |
|
ObjectiveComparator(int nObj,
boolean descendingOrder)
|
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two solutions. |
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 ObjectiveComparator(int nObj)
nObj
- The index of the objective to comparepublic ObjectiveComparator(int nObj, boolean descendingOrder)
Method Detail |
---|
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
o1
- Object representing the first Solution
.o2
- Object representing the second Solution
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |