class DoubleDistanceIntegerDBIDPair extends Object implements DoubleDistanceDBIDPair, IntegerDBIDRef
Modifier and Type | Field and Description |
---|---|
(package private) double |
distance
The distance value.
|
(package private) int |
id
The integer DBID.
|
Modifier | Constructor and Description |
---|---|
protected |
DoubleDistanceIntegerDBIDPair(double distance,
int id)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareByDistance(DistanceDBIDPair<DoubleDistance> o)
Compare to another result, by distance, smaller first.
|
double |
doubleDistance()
Get the distance.
|
boolean |
equals(Object o)
WARNING: calling equality on a reference may be an indicator of incorrect
usage, as it is not clear whether the programmer meant the references to be
the same or the DBIDs.
|
DoubleDistance |
getDistance()
Deprecated.
|
int |
hashCode()
WARNING: Hash codes of this interface might not be stable (e.g. for
iterators).
|
int |
internalGetIndex()
Get the internal index.
|
String |
toString() |
protected DoubleDistanceIntegerDBIDPair(double distance, int id)
distance
- Distance valueid
- integer object IDpublic double doubleDistance()
DoubleDistanceDBIDPair
doubleDistance
in interface DoubleDistanceDBIDPair
@Deprecated public DoubleDistance getDistance()
DoubleDistanceDBIDPair
getDistance
in interface DistanceDBIDPair<DoubleDistance>
getDistance
in interface DoubleDistanceDBIDPair
public int internalGetIndex()
DBIDRef
internalGetIndex
in interface DBIDRef
internalGetIndex
in interface IntegerDBIDRef
public int compareByDistance(DistanceDBIDPair<DoubleDistance> o)
DistanceDBIDPair
compareByDistance
in interface DistanceDBIDPair<DoubleDistance>
o
- Other resultpublic boolean equals(Object o)
DBIDRef
DBIDUtil.equal(de.lmu.ifi.dbs.elki.database.ids.DBIDRef, de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
or DBIDUtil.compare(de.lmu.ifi.dbs.elki.database.ids.DBIDRef, de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
!public int hashCode()
DBIDRef
DBIDUtil.deref(de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
to get an object with a stable hash code!