de.lmu.ifi.dbs.elki.index.tree.spatial
Class SpatialPair<K,V extends SpatialComparable>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.Pair<K,V>
      extended by 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.


Field Summary
 
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.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair
equals, getFirst, getSecond, hashCode, newPairArray, setFirst, setSecond, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpatialPair

public SpatialPair(K key,
                   V spatial)
Constructor: bundle a key and a spatial comparable

Parameters:
key - key
spatial - spatial value
Method Detail

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

Release 0.4.0 (2011-09-20_1324)