de.lmu.ifi.dbs.elki.index.tree.spatial
Class SpatialPair<K,V extends SpatialComparable>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.pairs.Pair<K,V>
de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialPair<K,V>
- All Implemented Interfaces:
- SpatialComparable, PairInterface<K,V>
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.
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
first, second |
Constructor Summary |
SpatialPair(K key,
V spatial)
Constructor: bundle a key and a spatial comparable |
Method Summary |
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. |
SpatialPair
public SpatialPair(K key,
V spatial)
- Constructor: bundle a key and a spatial comparable
- Parameters:
key
- keyspatial
- spatial value
getDimensionality
public int getDimensionality()
- Description copied from interface:
SpatialComparable
- Returns the dimensionality of the object.
- Specified by:
getDimensionality
in interface SpatialComparable
- 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 interface SpatialComparable
- Parameters:
dimension
- the dimension for which the coordinate should be returned,
where 1 ≤ 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 interface SpatialComparable
- Parameters:
dimension
- the dimension for which the coordinate should be returned,
where 1 ≤ dimension ≤ getDimensionality()
- Returns:
- the maximum coordinate at the specified dimension