|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.database.query.DoubleDistanceResultPair
public class DoubleDistanceResultPair
Optimized DistanceResultPair that avoids/postpones an extra layer of boxing for double values.
Field Summary | |
---|---|
(package private) double |
distance
Distance value |
(package private) DBID |
id
Object ID |
Constructor Summary | |
---|---|
DoubleDistanceResultPair(double distance,
DBID id)
Constructor. |
Method Summary | |
---|---|
int |
compareByDistance(DistanceResultPair<DoubleDistance> o)
Compare value, but by distance only. |
int |
compareTo(DistanceResultPair<DoubleDistance> o)
|
boolean |
equals(Object obj)
|
DBID |
getDBID()
Getter for second element in pair |
DoubleDistance |
getDistance()
Getter for first |
double |
getDoubleDistance()
Get the distance as double value. |
DoubleDistance |
getFirst()
Deprecated. Use getDoubleDistance() or getDistance() for clearness. |
DBID |
getSecond()
Deprecated. Use getDBID() for clearness. |
void |
setDistance(DoubleDistance distance)
Setter for first |
void |
setID(DBID id)
Setter for second |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
double distance
DBID id
Constructor Detail |
---|
public DoubleDistanceResultPair(double distance, DBID id)
distance
- Distance valueid
- Object IDMethod Detail |
---|
public DoubleDistance getDistance()
DistanceResultPair
getDistance
in interface DistanceResultPair<DoubleDistance>
public void setDistance(DoubleDistance distance)
DistanceResultPair
setDistance
in interface DistanceResultPair<DoubleDistance>
distance
- new value for first elementpublic DBID getDBID()
DistanceResultPair
getDBID
in interface DistanceResultPair<DoubleDistance>
public void setID(DBID id)
DistanceResultPair
setID
in interface DistanceResultPair<DoubleDistance>
id
- new value for second element@Deprecated public DoubleDistance getFirst()
getDoubleDistance()
or getDistance()
for clearness.
PairInterface
getFirst
in interface PairInterface<DoubleDistance,DBID>
@Deprecated public DBID getSecond()
getDBID()
for clearness.
PairInterface
getSecond
in interface PairInterface<DoubleDistance,DBID>
public int compareByDistance(DistanceResultPair<DoubleDistance> o)
DistanceResultPair
compareByDistance
in interface DistanceResultPair<DoubleDistance>
o
- Other object
public int compareTo(DistanceResultPair<DoubleDistance> o)
compareTo
in interface Comparable<DistanceResultPair<DoubleDistance>>
public boolean equals(Object obj)
equals
in class Object
public double getDoubleDistance()
public String toString()
toString
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |