public class ObjectiveComparator extends Object implements Comparator<Solution>
| Modifier and Type | Class and Description |
|---|---|
static class |
ObjectiveComparator.Ordering |
| Constructor and Description |
|---|
ObjectiveComparator(int objectiveId)
Constructor.
|
ObjectiveComparator(int objectiveId,
ObjectiveComparator.Ordering order)
Comparator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Solution solution1,
Solution solution2)
Compares two solutions according to a given objective.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ObjectiveComparator(int objectiveId)
objectiveId - The index of the objective to comparepublic ObjectiveComparator(int objectiveId,
ObjectiveComparator.Ordering order)
objectiveId - The index of the objective to compareorder - Ascending or descending orderpublic int compare(Solution solution1, Solution solution2)
compare in interface Comparator<Solution>solution1 - The first solutionsolution2 - The second solutionCopyright © 2015. All rights reserved.