public final class DistanceDBIDResultUtil extends Object
Modifier and Type | Field and Description |
---|---|
private static Comparator<DistanceDBIDPair<?>> |
BY_DISTANCE_THEN_DBID
Static comparator.
|
static Comparator<DistanceDBIDPair<?>> |
BY_REVERSE_DISTANCE
Static comparator for heaps.
|
Constructor and Description |
---|
DistanceDBIDResultUtil() |
Modifier and Type | Method and Description |
---|---|
static <D extends DistanceDBIDPair<?>> |
distanceComparator()
Get a comparator to sort by distance, then DBID
|
static <D extends DistanceDBIDPair<?>> |
sortByDistance(List<? extends D> list)
Sort a Java list by distance.
|
static String |
toString(DistanceDBIDList<?> res) |
private static final Comparator<DistanceDBIDPair<?>> BY_DISTANCE_THEN_DBID
public static final Comparator<DistanceDBIDPair<?>> BY_REVERSE_DISTANCE
public static <D extends DistanceDBIDPair<?>> Comparator<? super D> distanceComparator()
public static <D extends DistanceDBIDPair<?>> void sortByDistance(List<? extends D> list)
list
- List to sortpublic static String toString(DistanceDBIDList<?> res)