Package elki.data.spatial
Class SpatialSingleMaxComparator
- java.lang.Object
-
- elki.data.spatial.SpatialSingleMaxComparator
-
- All Implemented Interfaces:
java.util.Comparator<SpatialComparable>
public class SpatialSingleMaxComparator extends java.lang.Object implements java.util.Comparator<SpatialComparable>
Comparator for sorting spatial objects by the maximum value in a single dimension.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
dim
Current dimension.
-
Constructor Summary
Constructors Constructor Description SpatialSingleMaxComparator(int dim)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(SpatialComparable o1, SpatialComparable o2)
void
setDimension(int dim)
Set the dimension to sort by.
-
-
-
Method Detail
-
setDimension
public void setDimension(int dim)
Set the dimension to sort by.- Parameters:
dim
- Dimension
-
compare
public int compare(SpatialComparable o1, SpatialComparable o2)
- Specified by:
compare
in interfacejava.util.Comparator<SpatialComparable>
-
-