E
- the type of Entry used in the indexpublic class DistanceEntry<E extends Entry> extends Object implements Comparable<DistanceEntry<E>>
Modifier and Type | Field and Description |
---|---|
private double |
distance
The distance value belonging to the entry.
|
private E |
entry
The entry of the Index.
|
private int |
index
The index of the entry in its parent's child array.
|
Constructor and Description |
---|
DistanceEntry(E entry,
double distance,
int index)
Constructs a new DistanceEntry object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DistanceEntry<E> o)
Compares this object with the specified object for order.
|
double |
getDistance()
Returns the distance value belonging to the entry.
|
E |
getEntry()
Returns the entry of the Index.
|
int |
getIndex()
Returns the index of this entry in its parents child array.
|
String |
toString()
Returns a string representation of the object.
|
private double distance
private int index
public DistanceEntry(E entry, double distance, int index)
entry
- the entry of the Indexdistance
- the distance value belonging to the entryindex
- the index of the entry in its parent' child arraypublic E getEntry()
public double getDistance()
public int getIndex()
public int compareTo(DistanceEntry<E> o)
compareTo
in interface Comparable<DistanceEntry<E extends Entry>>
o
- the Object to be compared.ClassCastException
- if the specified object's type prevents it from
being compared to this Object.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.