T - The type of the Measurables that are compared by the comparatorpublic static class Heuristic.Comparator<T extends Measurable>
extends java.lang.Object
implements java.util.Comparator<T>, java.io.Serializable
Measurables based on their heuristic values
according to a certain Heuristic. This takes into account whether the heuristic is a
gain or a loss metric, i.e. confusion matrices with heuristic values that are considered to
be better are always sorted before those with heuristic values that are considered to be
worse.| Constructor and Description |
|---|
Comparator(@NotNull Heuristic heuristic)
Creates a new comparator that allows to compare
Measurables. |
Comparator(@NotNull Heuristic heuristic,
@Nullable TieBreaker<T> tieBreaker)
Creates a new comparator that allows to compare
Measurables and uses a specific
TieBreaker. |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T o1,
T o2) |
public Comparator(@NotNull
@NotNull Heuristic heuristic)
Measurables.heuristic - The heuristic that is used to compare the Measurablespublic Comparator(@NotNull
@NotNull Heuristic heuristic,
@Nullable
@Nullable TieBreaker<T> tieBreaker)
Measurables and uses a specific
TieBreaker.heuristic - The heuristic that is used to compare the MeasurablestieBreaker - The tie breaker that should be used to decide which one of two Measurables that evaluate to the same heuristic value is considered to
be betterpublic int compare(T o1, T o2)
compare in interface java.util.Comparator<T extends Measurable>