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 int
getDimensionality()
Returns the dimensionality of the object.double
getMax(int dimension)
Returns the maximum coordinate at the specified dimension.double
getMin(int dimension)
Returns the minimum coordinate at the specified dimension.
-
-
-
Method Detail
-
getDimensionality
public int getDimensionality()
Description copied from interface:SpatialComparable
Returns the dimensionality of the object.- Specified by:
getDimensionality
in interfaceSpatialComparable
- Returns:
- the dimensionality
-
getMin
public double getMin(int dimension)
Description copied from interface:SpatialComparable
Returns the minimum coordinate at the specified dimension.- Specified by:
getMin
in 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:SpatialComparable
Returns the maximum coordinate at the specified dimension.- Specified by:
getMax
in interfaceSpatialComparable
- Parameters:
dimension
- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()
- Returns:
- the maximum coordinate at the specified dimension
-
-