Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.database
Class DistanceResultPair<D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.Pair<FIRST,SECOND>
      extended by de.lmu.ifi.dbs.elki.utilities.pairs.CPair<D,Integer>
          extended by de.lmu.ifi.dbs.elki.database.DistanceResultPair<D>
Type Parameters:
D - Distance type
All Implemented Interfaces:
Comparable<CPair<D,Integer>>

public class DistanceResultPair<D extends Distance<D>>
extends CPair<D,Integer>

Class that consists of a pair (distance, object ID) commonly returned for kNN and range queries.

Author:
Erich Schubert

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair
first, second
 
Constructor Summary
DistanceResultPair(D first, Integer second)
          Canonical constructor
 
Method Summary
 D getDistance()
          Getter for first
 Integer getID()
          Getter for second element in pair
 void setDistance(D first)
          Setter for first
 void setID(Integer second)
          Setter for second
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.CPair
compareTo, newArray
 
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

DistanceResultPair

public DistanceResultPair(D first,
                          Integer second)
Canonical constructor

Parameters:
first - Distance
second - Object ID
Method Detail

getDistance

public final D getDistance()
Getter for first

Returns:
first element in pair

setDistance

public final void setDistance(D first)
Setter for first

Parameters:
first - new value for first element

getID

public final Integer getID()
Getter for second element in pair

Returns:
second element in pair

setID

public final void setID(Integer second)
Setter for second

Parameters:
second - new value for second element

Release 0.3 (2010-03-31_1612)