Package elki.index.preprocessed.knn
Class SpatialPair<K,V extends SpatialComparable>
- java.lang.Object
-
- elki.utilities.pairs.Pair<K,V>
-
- elki.index.preprocessed.knn.SpatialPair<K,V>
-
- All Implemented Interfaces:
SpatialComparable
public class SpatialPair<K,V extends SpatialComparable> extends Pair<K,V> implements SpatialComparable
Defines the requirements for objects that can be indexed by a Spatial Index, which are spatial nodes or data objects.- Since:
- 0.4.0
- Author:
- Elke Achtert
-
-
Constructor Summary
Constructors Constructor Description SpatialPair(K key, V spatial)Constructor: bundle a key and a spatial comparable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDimensionality()Returns the dimensionality of the object.doublegetMax(int dimension)Returns the maximum coordinate at the specified dimension.doublegetMin(int dimension)Returns the minimum coordinate at the specified dimension.
-
-
-
Method Detail
-
getDimensionality
public int getDimensionality()
Description copied from interface:SpatialComparableReturns the dimensionality of the object.- Specified by:
getDimensionalityin interfaceSpatialComparable- Returns:
- the dimensionality
-
getMin
public double getMin(int dimension)
Description copied from interface:SpatialComparableReturns the minimum coordinate at the specified dimension.- Specified by:
getMinin interfaceSpatialComparable- Parameters:
dimension- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()- Returns:
- the minimum coordinate at the specified dimension
-
getMax
public double getMax(int dimension)
Description copied from interface:SpatialComparableReturns the maximum coordinate at the specified dimension.- Specified by:
getMaxin interfaceSpatialComparable- Parameters:
dimension- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()- Returns:
- the maximum coordinate at the specified dimension
-
-