|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.pairs.Pair<D,DBID> de.lmu.ifi.dbs.elki.database.query.GenericDistanceResultPair<D>
D
- Distance typepublic class GenericDistanceResultPair<D extends Distance<D>>
Trivial implementation using a generic pair.
Field Summary |
---|
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
---|
first, second |
Constructor Summary | |
---|---|
GenericDistanceResultPair(D first,
DBID second)
Canonical constructor |
Method Summary | |
---|---|
int |
compareByDistance(DistanceResultPair<D> o)
Compare value, but by distance only. |
int |
compareTo(DistanceResultPair<D> o)
|
boolean |
equals(Object obj)
Simple equals statement. |
DBID |
getDBID()
Getter for second element in pair |
D |
getDistance()
Getter for first |
void |
setDistance(D first)
Setter for first |
void |
setID(DBID second)
Setter for second |
String |
toString()
Canonical toString operator |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
---|
getFirst, getSecond, hashCode, newPairArray, setFirst, setSecond |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.pairs.PairInterface |
---|
getFirst, getSecond |
Constructor Detail |
---|
public GenericDistanceResultPair(D first, DBID second)
first
- Distancesecond
- Object IDMethod Detail |
---|
public final D getDistance()
getDistance
in interface DistanceResultPair<D extends Distance<D>>
public final void setDistance(D first)
setDistance
in interface DistanceResultPair<D extends Distance<D>>
first
- new value for first elementpublic final DBID getDBID()
getDBID
in interface DistanceResultPair<D extends Distance<D>>
public final void setID(DBID second)
setID
in interface DistanceResultPair<D extends Distance<D>>
second
- new value for second elementpublic int compareByDistance(DistanceResultPair<D> o)
DistanceResultPair
compareByDistance
in interface DistanceResultPair<D extends Distance<D>>
o
- Other object
public int compareTo(DistanceResultPair<D> o)
compareTo
in interface Comparable<DistanceResultPair<D extends Distance<D>>>
public boolean equals(Object obj)
Pair
Pair.first
and Pair.second
element of
this Pair equal the Pair.first
and Pair.second
element,
respectively, of the other Pair.
equals
in class Pair<D extends Distance<D>,DBID>
obj
- Object to compare topublic String toString()
Pair
toString
in class Pair<D extends Distance<D>,DBID>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |